< 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:57
Uncovered lines:0
Coverable lines:57
Total lines:112
Line coverage:100% (57 of 57)
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 SphereShapeRegister sphereShapeRegister;
 12        private readonly BoxShapeRegister boxShapeRegister;
 13        private readonly PlaneShapeRegister planeShapeRegister;
 14        private readonly CylinderShapeRegister cylinderShapeRegister;
 15        private readonly AudioStreamRegister audioStreamRegister;
 16        private readonly AudioSourceRegister audioSourceRegister;
 17        private readonly GLTFShapeRegister gltfRegister;
 18        private readonly ECSTextShapeRegister textShapeRegister;
 19        private readonly NFTShapeRegister nftRegister;
 20        private readonly OnPointerDownRegister pointerDownRegister;
 21        private readonly OnPointerUpRegister pointerUpRegister;
 22        private readonly AnimatorRegister animatorRegister;
 23        private readonly BillboardRegister billboardRegister;
 24        private readonly AvatarShapeRegister avatarShapeRegister;
 25        private readonly CameraModeAreaRegister cameraModeAreaRegister;
 26        private readonly AvatarModifierAreaRegister avatarModifierAreaRegister;
 27        private readonly AvatarAttachRegister avatarAttachRegister;
 28        private readonly MaterialRegister materialRegister;
 29        private readonly MeshRendererRegister meshRendererRegister;
 30        private readonly MeshColliderRegister meshColliderRegister;
 31
 32        // UI components
 33        private readonly UITransformRegister uiTransformRegister;
 34        private readonly UITextRegister uiTextRegister;
 35
 36        // Those components are only here to serialize over the wire, we don't need a handler for these
 37        private readonly OnPointerDownResultRegister pointerDownResultRegister;
 38        private readonly OnPointerUpResultRegister pointerUpResultRegister;
 39        private readonly CameraModeRegister cameraModeRegister;
 40        private readonly PointerLockRegister pointerLockRegister;
 41
 1642        public ECS7ComponentsComposer(ECSComponentsFactory componentsFactory, IECSComponentWriter componentsWriter, IInt
 43        {
 1644            transformRegister = new TransformRegister(ComponentID.TRANSFORM, componentsFactory, componentsWriter);
 1645            sphereShapeRegister = new SphereShapeRegister(ComponentID.SPHERE_SHAPE, componentsFactory, componentsWriter,
 1646            boxShapeRegister = new BoxShapeRegister(ComponentID.BOX_SHAPE, componentsFactory, componentsWriter, internal
 1647            planeShapeRegister = new PlaneShapeRegister(ComponentID.PLANE_SHAPE, componentsFactory, componentsWriter, in
 1648            cylinderShapeRegister = new CylinderShapeRegister(ComponentID.CYLINDER_SHAPE, componentsFactory, componentsW
 1649            audioStreamRegister = new AudioStreamRegister(ComponentID.AUDIO_STREAM, componentsFactory, componentsWriter)
 1650            audioSourceRegister = new AudioSourceRegister(ComponentID.AUDIO_SOURCE, componentsFactory, componentsWriter)
 1651            nftRegister = new NFTShapeRegister(ComponentID.NFT_SHAPE, componentsFactory, componentsWriter);
 1652            textShapeRegister = new ECSTextShapeRegister(ComponentID.TEXT_SHAPE, componentsFactory, componentsWriter);
 1653            gltfRegister = new GLTFShapeRegister(ComponentID.GLTF_SHAPE, componentsFactory, componentsWriter);
 1654            pointerDownRegister = new OnPointerDownRegister(ComponentID.ON_POINTER_DOWN, componentsFactory, componentsWr
 1655            pointerUpRegister = new OnPointerUpRegister(ComponentID.ON_POINTER_UP, componentsFactory, componentsWriter);
 1656            animatorRegister = new AnimatorRegister(ComponentID.ANIMATOR, componentsFactory, componentsWriter);
 1657            billboardRegister = new BillboardRegister(ComponentID.BILLBOARD, componentsFactory, componentsWriter);
 1658            avatarAttachRegister = new AvatarAttachRegister(ComponentID.AVATAR_ATTACH, componentsFactory, componentsWrit
 1659            avatarModifierAreaRegister = new AvatarModifierAreaRegister(ComponentID.AVATAR_MODIFIER_AREA, componentsFact
 1660            avatarShapeRegister = new AvatarShapeRegister(ComponentID.AVATAR_SHAPE, componentsFactory, componentsWriter)
 1661            cameraModeAreaRegister = new CameraModeAreaRegister(ComponentID.CAMERA_MODE_AREA, componentsFactory, compone
 1662            materialRegister = new MaterialRegister(ComponentID.MATERIAL, componentsFactory, componentsWriter, internalC
 1663            meshRendererRegister = new MeshRendererRegister(ComponentID.MESH_RENDERER, componentsFactory, componentsWrit
 1664            meshColliderRegister = new MeshColliderRegister(ComponentID.MESH_COLLIDER, componentsFactory, componentsWrit
 65
 66            // UI components
 1667            uiTransformRegister = new UITransformRegister(ComponentID.UI_TRANSFORM, componentsFactory, componentsWriter)
 1668            uiTextRegister = new UITextRegister(ComponentID.UI_TEXT, componentsFactory, componentsWriter);
 69
 70            // Components without a handler
 1671            pointerDownResultRegister = new OnPointerDownResultRegister(ComponentID.ON_POINTER_DOWN_RESULT, componentsFa
 1672            pointerUpResultRegister = new OnPointerUpResultRegister(ComponentID.ON_POINTER_UP_RESULT, componentsFactory,
 1673            cameraModeRegister = new CameraModeRegister(ComponentID.CAMERA_MODE, componentsFactory, componentsWriter);
 1674            pointerLockRegister = new PointerLockRegister(ComponentID.POINTER_LOCK, componentsFactory, componentsWriter)
 1675        }
 76
 77        public void Dispose()
 78        {
 1279            transformRegister.Dispose();
 1280            sphereShapeRegister.Dispose();
 1281            boxShapeRegister.Dispose();
 1282            billboardRegister.Dispose();
 1283            planeShapeRegister.Dispose();
 1284            cylinderShapeRegister.Dispose();
 1285            audioStreamRegister.Dispose();
 1286            audioSourceRegister.Dispose();
 1287            textShapeRegister.Dispose();
 1288            nftRegister.Dispose();
 1289            gltfRegister.Dispose();
 1290            animatorRegister.Dispose();
 1291            avatarAttachRegister.Dispose();
 1292            avatarModifierAreaRegister.Dispose();
 1293            pointerDownRegister.Dispose();
 1294            pointerUpRegister.Dispose();
 1295            avatarShapeRegister.Dispose();
 1296            cameraModeAreaRegister.Dispose();
 1297            materialRegister.Dispose();
 1298            meshRendererRegister.Dispose();
 1299            meshColliderRegister.Dispose();
 100
 101            // UI components
 12102            uiTransformRegister.Dispose();
 12103            uiTextRegister.Dispose();
 104
 105            // Components without a handler
 12106            pointerDownResultRegister.Dispose();
 12107            pointerUpResultRegister.Dispose();
 12108            cameraModeRegister.Dispose();
 12109            pointerLockRegister.Dispose();
 12110        }
 111    }
 112}