< 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:59
Uncovered lines:0
Coverable lines:59
Total lines:115
Line coverage:100% (59 of 59)
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        private readonly VisibilityComponentRegister visibilityComponentRegister;
 32
 33        // UI components
 34        private readonly UITransformRegister uiTransformRegister;
 35        private readonly UITextRegister uiTextRegister;
 36
 37        // Those components are only here to serialize over the wire, we don't need a handler for these
 38        private readonly OnPointerDownResultRegister pointerDownResultRegister;
 39        private readonly OnPointerUpResultRegister pointerUpResultRegister;
 40        private readonly CameraModeRegister cameraModeRegister;
 41        private readonly PointerLockRegister pointerLockRegister;
 42
 1643        public ECS7ComponentsComposer(ECSComponentsFactory componentsFactory, IECSComponentWriter componentsWriter, IInt
 44        {
 1645            transformRegister = new TransformRegister(ComponentID.TRANSFORM, componentsFactory, componentsWriter);
 1646            sphereShapeRegister = new SphereShapeRegister(ComponentID.SPHERE_SHAPE, componentsFactory, componentsWriter,
 1647            boxShapeRegister = new BoxShapeRegister(ComponentID.BOX_SHAPE, componentsFactory, componentsWriter, internal
 1648            planeShapeRegister = new PlaneShapeRegister(ComponentID.PLANE_SHAPE, componentsFactory, componentsWriter, in
 1649            cylinderShapeRegister = new CylinderShapeRegister(ComponentID.CYLINDER_SHAPE, componentsFactory, componentsW
 1650            audioStreamRegister = new AudioStreamRegister(ComponentID.AUDIO_STREAM, componentsFactory, componentsWriter)
 1651            audioSourceRegister = new AudioSourceRegister(ComponentID.AUDIO_SOURCE, componentsFactory, componentsWriter)
 1652            nftRegister = new NFTShapeRegister(ComponentID.NFT_SHAPE, componentsFactory, componentsWriter);
 1653            textShapeRegister = new ECSTextShapeRegister(ComponentID.TEXT_SHAPE, componentsFactory, componentsWriter);
 1654            gltfRegister = new GLTFShapeRegister(ComponentID.GLTF_SHAPE, componentsFactory, componentsWriter);
 1655            pointerDownRegister = new OnPointerDownRegister(ComponentID.ON_POINTER_DOWN, componentsFactory, componentsWr
 1656            pointerUpRegister = new OnPointerUpRegister(ComponentID.ON_POINTER_UP, componentsFactory, componentsWriter);
 1657            animatorRegister = new AnimatorRegister(ComponentID.ANIMATOR, componentsFactory, componentsWriter);
 1658            billboardRegister = new BillboardRegister(ComponentID.BILLBOARD, componentsFactory, componentsWriter);
 1659            avatarAttachRegister = new AvatarAttachRegister(ComponentID.AVATAR_ATTACH, componentsFactory, componentsWrit
 1660            avatarModifierAreaRegister = new AvatarModifierAreaRegister(ComponentID.AVATAR_MODIFIER_AREA, componentsFact
 1661            avatarShapeRegister = new AvatarShapeRegister(ComponentID.AVATAR_SHAPE, componentsFactory, componentsWriter)
 1662            cameraModeAreaRegister = new CameraModeAreaRegister(ComponentID.CAMERA_MODE_AREA, componentsFactory, compone
 1663            materialRegister = new MaterialRegister(ComponentID.MATERIAL, componentsFactory, componentsWriter, internalC
 1664            meshRendererRegister = new MeshRendererRegister(ComponentID.MESH_RENDERER, componentsFactory, componentsWrit
 1665            meshColliderRegister = new MeshColliderRegister(ComponentID.MESH_COLLIDER, componentsFactory, componentsWrit
 1666            visibilityComponentRegister = new VisibilityComponentRegister(ComponentID.VISIBILITY_COMPONENT, componentsFa
 67
 68            // UI components
 1669            uiTransformRegister = new UITransformRegister(ComponentID.UI_TRANSFORM, componentsFactory, componentsWriter)
 1670            uiTextRegister = new UITextRegister(ComponentID.UI_TEXT, componentsFactory, componentsWriter);
 71
 72            // Components without a handler
 1673            pointerDownResultRegister = new OnPointerDownResultRegister(ComponentID.ON_POINTER_DOWN_RESULT, componentsFa
 1674            pointerUpResultRegister = new OnPointerUpResultRegister(ComponentID.ON_POINTER_UP_RESULT, componentsFactory,
 1675            cameraModeRegister = new CameraModeRegister(ComponentID.CAMERA_MODE, componentsFactory, componentsWriter);
 1676            pointerLockRegister = new PointerLockRegister(ComponentID.POINTER_LOCK, componentsFactory, componentsWriter)
 1677        }
 78
 79        public void Dispose()
 80        {
 1281            transformRegister.Dispose();
 1282            sphereShapeRegister.Dispose();
 1283            boxShapeRegister.Dispose();
 1284            billboardRegister.Dispose();
 1285            planeShapeRegister.Dispose();
 1286            cylinderShapeRegister.Dispose();
 1287            audioStreamRegister.Dispose();
 1288            audioSourceRegister.Dispose();
 1289            textShapeRegister.Dispose();
 1290            nftRegister.Dispose();
 1291            gltfRegister.Dispose();
 1292            animatorRegister.Dispose();
 1293            avatarAttachRegister.Dispose();
 1294            avatarModifierAreaRegister.Dispose();
 1295            pointerDownRegister.Dispose();
 1296            pointerUpRegister.Dispose();
 1297            avatarShapeRegister.Dispose();
 1298            cameraModeAreaRegister.Dispose();
 1299            materialRegister.Dispose();
 12100            meshRendererRegister.Dispose();
 12101            meshColliderRegister.Dispose();
 12102            visibilityComponentRegister.Dispose();
 103
 104            // UI components
 12105            uiTransformRegister.Dispose();
 12106            uiTextRegister.Dispose();
 107
 108            // Components without a handler
 12109            pointerDownResultRegister.Dispose();
 12110            pointerUpResultRegister.Dispose();
 12111            cameraModeRegister.Dispose();
 12112            pointerLockRegister.Dispose();
 12113        }
 114    }
 115}