< Summary

Class:DCL.PluginInfo
Assembly:PluginSystem
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/PluginSystem/PluginInfo.cs
Covered lines:7
Uncovered lines:3
Coverable lines:10
Total lines:27
Line coverage:70% (7 of 10)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Enable()0%2.062075%
Disable()0%2.032080%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/PluginSystem/PluginInfo.cs

#LineLine coverage
 1namespace DCL
 2{
 3    public class PluginInfo
 4    {
 05        public bool isEnabled => instance != null;
 6        public string flag;
 7        public PluginBuilder builder;
 8        public IPlugin instance;
 9
 10        public void Enable()
 11        {
 912            if ( isEnabled )
 013                return;
 14
 915            instance = builder.Invoke();
 916        }
 17
 18        public void Disable()
 19        {
 920            if ( !isEnabled )
 021                return;
 22
 923            instance.Dispose();
 924            instance = null;
 925        }
 26    }
 27}

Methods/Properties

isEnabled()
Enable()
Disable()