< Summary

Class:DCL.ECS7.ComponentWrapper.Generic.PooledWrappedComponent[T]
Assembly:ECS7Plugin.ComponentWrapper
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ComponentWrapper/Generic/PooledWrappedComponent.cs
Covered lines:7
Uncovered lines:1
Coverable lines:8
Total lines:25
Line coverage:87.5% (7 of 8)
Covered branches:0
Total branches:0
Covered methods:3
Total methods:4
Method coverage:75% (3 of 4)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
implicit operator T(...)0%2100%
PooledWrappedComponent(...)0%110100%
Dispose()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ComponentWrapper/Generic/PooledWrappedComponent.cs

#LineLine coverage
 1namespace DCL.ECS7.ComponentWrapper.Generic
 2{
 3    public record PooledWrappedComponent<T> : IPooledWrappedComponent where T: class, IWrappedComponent
 4    {
 5        private readonly WrappedComponentPool<T> pool;
 6
 7        public readonly T WrappedComponent;
 8
 629        public IWrappedComponent WrappedComponentBase => WrappedComponent;
 10
 11        public static implicit operator T(PooledWrappedComponent<T> pooled) =>
 012            pooled.WrappedComponent;
 13
 9614        internal PooledWrappedComponent(T wrappedComponent, WrappedComponentPool<T> pool)
 15        {
 9616            this.WrappedComponent = wrappedComponent;
 9617            this.pool = pool;
 9618        }
 19
 20        public void Dispose()
 21        {
 1022            pool.Release(this);
 1023        }
 24    }
 25}