< Summary

Class:DCLServices.MapRendererV2.MapLayers.MapLayerControllerBase
Assembly:MapRendererV2
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLServices/MapRendererV2/MapLayers/MapLayerControllerBase.cs
Covered lines:15
Uncovered lines:1
Coverable lines:16
Total lines:36
Line coverage:93.7% (15 of 16)
Covered branches:0
Total branches:0
Covered methods:7
Total methods:8
Method coverage:87.5% (7 of 8)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
MapLayerControllerBase(...)0%110100%
Dispose()0%110100%
DisposeImpl()0%110100%
LinkWithDisposeToken(...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLServices/MapRendererV2/MapLayers/MapLayerControllerBase.cs

#LineLine coverage
 1using DCLServices.MapRendererV2.CoordsUtils;
 2using DCLServices.MapRendererV2.Culling;
 3using System.Threading;
 4using UnityEngine;
 5
 6namespace DCLServices.MapRendererV2.MapLayers
 7{
 8    internal abstract class MapLayerControllerBase
 9    {
 265210        protected ICoordsUtils coordsUtils { get; }
 78011        protected CancellationTokenSource ctsDisposing { get; }
 1044812        protected Transform instantiationParent { get; }
 013        protected IMapCullingController mapCullingController { get; }
 14
 86415        protected MapLayerControllerBase(Transform instantiationParent, ICoordsUtils coordsUtils, IMapCullingController 
 16        {
 86417            ctsDisposing = new CancellationTokenSource();
 86418            this.coordsUtils = coordsUtils;
 86419            this.instantiationParent = instantiationParent;
 86420            this.mapCullingController = cullingController;
 86421        }
 22
 23        public void Dispose()
 24        {
 5425            ctsDisposing.Cancel();
 5426            ctsDisposing.Dispose();
 5427            DisposeImpl();
 5428        }
 29
 630        protected virtual void DisposeImpl() { }
 31
 32
 33        protected CancellationTokenSource LinkWithDisposeToken(CancellationToken globalCancellation) =>
 48034            CancellationTokenSource.CreateLinkedTokenSource(globalCancellation, ctsDisposing.Token);
 35    }
 36}