< Summary

Class:DCL.ECSComponents.AvatarAttachRegister
Assembly:DCL.ECSComponents.AvatarAttach
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/AvatarAttach/AvatarAttachRegister.cs
Covered lines:10
Uncovered lines:0
Coverable lines:10
Total lines:28
Line coverage:100% (10 of 10)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
AvatarAttachRegister(...)0%220100%
Dispose()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/AvatarAttach/AvatarAttachRegister.cs

#LineLine coverage
 1using System;
 2using DCL.ECSRuntime;
 3
 4namespace DCL.ECSComponents
 5{
 6    public class AvatarAttachRegister : IDisposable
 7    {
 8        private readonly ECSComponentsFactory factory;
 9        private readonly IECSComponentWriter componentWriter;
 10        private readonly int componentId;
 11
 2112        public AvatarAttachRegister(int componentId, ECSComponentsFactory factory, IECSComponentWriter componentWriter)
 13        {
 2114            factory.AddOrReplaceComponent(componentId, AvatarAttachSerializer.Deserialize, () => new AvatarAttachCompone
 2115            componentWriter.AddOrReplaceComponentSerializer<PBAvatarAttach>(componentId, AvatarAttachSerializer.Serializ
 16
 2117            this.factory = factory;
 2118            this.componentWriter = componentWriter;
 2119            this.componentId = componentId;
 2120        }
 21
 22        public void Dispose()
 23        {
 224            factory.RemoveComponent(componentId);
 225            componentWriter.RemoveComponentSerializer(componentId);
 226        }
 27    }
 28}