< 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:14
Uncovered lines:0
Coverable lines:14
Total lines:40
Line coverage:100% (14 of 14)
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, int sceneNumber, object model)
 8        {
 279            if (self.pendingSceneResources.TryGetValue(sceneNumber, out BaseRefCountedCollection<object> pendingResoruce
 10            {
 1811                pendingResoruces.IncreaseRefCount(model);
 12            }
 13            else
 14            {
 915                BaseRefCountedCollection<object> newCountedCollection = new BaseRefCountedCollection<object>();
 916                newCountedCollection.IncreaseRefCount(model);
 917                self.pendingSceneResources.Add(sceneNumber, newCountedCollection);
 18            }
 919        }
 20
 21        public static void RemovePendingResource(this DataStore_ECS7 self, int sceneNumber, object model)
 22        {
 5723            if (self.pendingSceneResources.TryGetValue(sceneNumber, out BaseRefCountedCollection<object> pendingResoruce
 24            {
 5125                pendingResoruces.DecreaseRefCount(model);
 26            }
 5727        }
 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}