< Summary

Class:DCL.ECSComponents.ECS7ComponentsComposer
Assembly:DCL.Plugins.ECS7Components
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/ECS7ComponentsComposer.cs
Covered lines:51
Uncovered lines:0
Coverable lines:51
Total lines:103
Line coverage:100% (51 of 51)
Covered branches:0
Total branches:0

Metrics

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

File(s)

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

#LineLine coverage
 1using System;
 2using DCL.ECS7;
 3using DCL.ECSRuntime;
 4using DCLPlugins.ECSComponents;
 5
 6namespace DCL.ECSComponents
 7{
 8    public class ECS7ComponentsComposer : IDisposable
 9    {
 10        private readonly TransformRegister transformRegister;
 11        private readonly AudioStreamRegister audioStreamRegister;
 12        private readonly AudioSourceRegister audioSourceRegister;
 13        private readonly GltfContainerRegister gltfRegister;
 14        private readonly ECSTextShapeRegister textShapeRegister;
 15        private readonly NFTShapeRegister nftRegister;
 16        private readonly AnimatorRegister animatorRegister;
 17        private readonly BillboardRegister billboardRegister;
 18        private readonly AvatarShapeRegister avatarShapeRegister;
 19        private readonly CameraModeAreaRegister cameraModeAreaRegister;
 20        private readonly AvatarModifierAreaRegister avatarModifierAreaRegister;
 21        private readonly AvatarAttachRegister avatarAttachRegister;
 22        private readonly MaterialRegister materialRegister;
 23        private readonly RaycastRegister raycastRegister;
 24        private readonly RaycastResultRegister raycastResultRegister;
 25        private readonly MeshRendererRegister meshRendererRegister;
 26        private readonly MeshColliderRegister meshColliderRegister;
 27        private readonly VisibilityComponentRegister visibilityComponentRegister;
 28        private readonly PointerEventsRegister pointerEventsRegister;
 29
 30        // UI components
 31        private readonly UITransformRegister uiTransformRegister;
 32        private readonly UITextRegister uiTextRegister;
 33
 34        // Those components are only here to serialize over the wire, we don't need a handler for these
 35        private readonly PointerEventResultRegister pointerEventResultRegister;
 36        private readonly CameraModeRegister cameraModeRegister;
 37        private readonly PointerLockRegister pointerLockRegister;
 38
 2639        public ECS7ComponentsComposer(ECSComponentsFactory componentsFactory, IECSComponentWriter componentsWriter, IInt
 40        {
 2641            transformRegister = new TransformRegister(ComponentID.TRANSFORM, componentsFactory, componentsWriter);
 2642            audioStreamRegister = new AudioStreamRegister(ComponentID.AUDIO_STREAM, componentsFactory, componentsWriter)
 2643            audioSourceRegister = new AudioSourceRegister(ComponentID.AUDIO_SOURCE, componentsFactory, componentsWriter)
 2644            nftRegister = new NFTShapeRegister(ComponentID.NFT_SHAPE, componentsFactory, componentsWriter, internalCompo
 2645            textShapeRegister = new ECSTextShapeRegister(ComponentID.TEXT_SHAPE, componentsFactory, componentsWriter);
 2646            gltfRegister = new GltfContainerRegister(ComponentID.GLTF_CONTAINER, componentsFactory, componentsWriter, in
 2647            animatorRegister = new AnimatorRegister(ComponentID.ANIMATOR, componentsFactory, componentsWriter);
 2648            billboardRegister = new BillboardRegister(ComponentID.BILLBOARD, componentsFactory, componentsWriter);
 2649            avatarAttachRegister = new AvatarAttachRegister(ComponentID.AVATAR_ATTACH, componentsFactory, componentsWrit
 2650            avatarModifierAreaRegister = new AvatarModifierAreaRegister(ComponentID.AVATAR_MODIFIER_AREA, componentsFact
 2651            avatarShapeRegister = new AvatarShapeRegister(ComponentID.AVATAR_SHAPE, componentsFactory, componentsWriter)
 2652            cameraModeAreaRegister = new CameraModeAreaRegister(ComponentID.CAMERA_MODE_AREA, componentsFactory, compone
 2653            materialRegister = new MaterialRegister(ComponentID.MATERIAL, componentsFactory, componentsWriter, internalC
 2654            raycastRegister = new RaycastRegister(ComponentID.RAYCAST, componentsFactory, componentsWriter, internalComp
 2655            raycastResultRegister = new RaycastResultRegister(ComponentID.RAYCAST_RESULT, componentsFactory, componentsW
 2656            meshRendererRegister = new MeshRendererRegister(ComponentID.MESH_RENDERER, componentsFactory, componentsWrit
 2657            meshColliderRegister = new MeshColliderRegister(ComponentID.MESH_COLLIDER, componentsFactory, componentsWrit
 2658            visibilityComponentRegister = new VisibilityComponentRegister(ComponentID.VISIBILITY_COMPONENT, componentsFa
 59
 60            // UI components
 2661            uiTransformRegister = new UITransformRegister(ComponentID.UI_TRANSFORM, componentsFactory, componentsWriter)
 2662            uiTextRegister = new UITextRegister(ComponentID.UI_TEXT, componentsFactory, componentsWriter);
 63
 64            // Components without a handler
 2665            pointerEventResultRegister = new PointerEventResultRegister(ComponentID.POINTER_EVENTS_RESULT, componentsFac
 2666            cameraModeRegister = new CameraModeRegister(ComponentID.CAMERA_MODE, componentsFactory, componentsWriter);
 2667            pointerLockRegister = new PointerLockRegister(ComponentID.POINTER_LOCK, componentsFactory, componentsWriter)
 2668            pointerEventsRegister = new PointerEventsRegister(ComponentID.POINTER_EVENTS, componentsFactory, componentsW
 2669        }
 70
 71        public void Dispose()
 72        {
 1373            transformRegister.Dispose();
 1374            billboardRegister.Dispose();
 1375            audioStreamRegister.Dispose();
 1376            audioSourceRegister.Dispose();
 1377            textShapeRegister.Dispose();
 1378            nftRegister.Dispose();
 1379            gltfRegister.Dispose();
 1380            animatorRegister.Dispose();
 1381            avatarAttachRegister.Dispose();
 1382            avatarModifierAreaRegister.Dispose();
 1383            avatarShapeRegister.Dispose();
 1384            cameraModeAreaRegister.Dispose();
 1385            materialRegister.Dispose();
 1386            raycastRegister.Dispose();
 1387            raycastResultRegister.Dispose();
 1388            meshRendererRegister.Dispose();
 1389            meshColliderRegister.Dispose();
 1390            visibilityComponentRegister.Dispose();
 91
 92            // UI components
 1393            uiTransformRegister.Dispose();
 1394            uiTextRegister.Dispose();
 95
 96            // Components without a handler
 1397            pointerEventResultRegister.Dispose();
 1398            cameraModeRegister.Dispose();
 1399            pointerLockRegister.Dispose();
 13100            pointerEventsRegister.Dispose();
 13101        }
 102    }
 103}