< 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        {
 259            if (self.pendingSceneResources.TryGetValue(sceneId, out BaseRefCountedCollection<object> pendingResoruces))
 10            {
 1611                pendingResoruces.IncreaseRefCount(model);
 1612            }
 13            else
 14            {
 915                BaseRefCountedCollection<object> newCountedCollection = new BaseRefCountedCollection<object>();
 916                newCountedCollection.IncreaseRefCount(model);
 917                self.pendingSceneResources.Add(sceneId, newCountedCollection);
 18            }
 919        }
 20
 21        public static void RemovePendingResource(this DataStore_ECS7 self, string sceneId, object model)
 22        {
 5323            if (self.pendingSceneResources.TryGetValue(sceneId, out BaseRefCountedCollection<object> pendingResoruces))
 24            {
 4725                pendingResoruces.DecreaseRefCount(model);
 26            }
 5327        }
 28
 29        public static void AddShapeReady(this DataStore_ECS7 self, long entityId, GameObject gameObject)
 30        {
 1231            self.shapesReady.AddOrSet(entityId, gameObject);
 1232        }
 33
 34        public static void RemoveShapeReady(this DataStore_ECS7 self, long entityId)
 35        {
 2036            if (self.shapesReady.ContainsKey(entityId))
 1137                self.shapesReady.Remove(entityId);
 2038        }
 39    }
 40}