< Summary

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

Metrics

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

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    {
 355        public bool isEnabled => instance != null;
 6        public string flag;
 7        public PluginBuilder builder;
 8        public IPlugin instance;
 9        public bool enableOnInit = false;
 10
 11        public void Enable()
 12        {
 1013            if ( isEnabled )
 014                return;
 15
 1016            instance = builder.Invoke();
 1017            enableOnInit = false;
 1018        }
 19
 20        public void Disable()
 21        {
 1122            if ( !isEnabled )
 123                return;
 24
 1025            instance.Dispose();
 1026            instance = null;
 1027        }
 28    }
 29}

Methods/Properties

isEnabled()
Enable()
Disable()