< Summary

Class:DCL.DataStore_ECS7_Extensions
Assembly:DataStore
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DataStore/Extensions/DataStore_ECS7_Extensions.cs
Covered lines:15
Uncovered lines:0
Coverable lines:15
Total lines:40
Line coverage:100% (15 of 15)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
AddPendingResource(...)0%220100%
RemovePendingResource(...)0%220100%
AddShapeReady(...)0%110100%
RemoveShapeReady(...)0%220100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DataStore/Extensions/DataStore_ECS7_Extensions.cs

#LineLine coverage
 1using UnityEngine;
 2
 3namespace DCL
 4{
 5    public static class DataStore_ECS7_Extensions
 6    {
 7        public static void AddPendingResource(this DataStore_ECS7 self, string sceneId, object model)
 8        {
 629            if (self.pendingSceneResources.TryGetValue(sceneId, out BaseRefCountedCollection<object> pendingResoruces))
 10            {
 5211                pendingResoruces.IncreaseRefCount(model);
 5212            }
 13            else
 14            {
 1015                BaseRefCountedCollection<object> newCountedCollection = new BaseRefCountedCollection<object>();
 1016                newCountedCollection.IncreaseRefCount(model);
 1017                self.pendingSceneResources.Add(sceneId, newCountedCollection);
 18            }
 1019        }
 20
 21        public static void RemovePendingResource(this DataStore_ECS7 self, string sceneId, object model)
 22        {
 11123            if (self.pendingSceneResources.TryGetValue(sceneId, out BaseRefCountedCollection<object> pendingResoruces))
 24            {
 10525                pendingResoruces.DecreaseRefCount(model);
 26            }
 11127        }
 28
 29        public static void AddShapeReady(this DataStore_ECS7 self, long entityId, GameObject gameObject)
 30        {
 4231            self.shapesReady.AddOrSet(entityId, gameObject);
 4232        }
 33
 34        public static void RemoveShapeReady(this DataStore_ECS7 self, long entityId)
 35        {
 5236            if (self.shapesReady.ContainsKey(entityId))
 4137                self.shapesReady.Remove(entityId);
 5238        }
 39    }
 40}