< 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:0
Uncovered lines:41
Coverable lines:41
Total lines:82
Line coverage:0% (0 of 41)
Covered branches:0
Total branches:0

Metrics

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

File(s)

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

#LineLine coverage
 1using System;
 2using DCL.ECSRuntime;
 3using DCL.ECS7;
 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 CameraModeAreaRegister cameraModeAreaRegister;
 25        private readonly AvatarModifierAreaRegister avatarModifierAreaRegister;
 26        private readonly AvatarAttachRegister avatarAttachRegister;
 27
 28        // Those components are only here to serialize over the wire, we don't need a handler for these
 29        private readonly OnPointerDownResultRegister pointerDownResultRegister;
 30        private readonly OnPointerUpResultRegister pointerUpResultRegister;
 31
 032        public ECS7ComponentsComposer(ECSComponentsFactory componentsFactory, IECSComponentWriter componentsWriter)
 33        {
 034            transformRegister = new TransformRegister(ComponentID.TRANSFORM, componentsFactory, componentsWriter);
 035            sphereShapeRegister = new SphereShapeRegister(ComponentID.SPHERE_SHAPE, componentsFactory, componentsWriter)
 036            boxShapeRegister = new BoxShapeRegister(ComponentID.BOX_SHAPE, componentsFactory, componentsWriter);
 037            planeShapeRegister = new PlaneShapeRegister(ComponentID.PLANE_SHAPE, componentsFactory, componentsWriter);
 038            cylinderShapeRegister = new CylinderShapeRegister(ComponentID.CYLINDER_SHAPE, componentsFactory, componentsW
 039            audioStreamRegister = new AudioStreamRegister(ComponentID.AUDIO_STREAM, componentsFactory, componentsWriter)
 040            audioSourceRegister = new AudioSourceRegister(ComponentID.AUDIO_SOURCE, componentsFactory, componentsWriter)
 041            nftRegister = new NFTShapeRegister(ComponentID.NFT_SHAPE, componentsFactory, componentsWriter);
 042            textShapeRegister = new ECSTextShapeRegister(ComponentID.TEXT_SHAPE, componentsFactory, componentsWriter);
 043            gltfRegister = new GLTFShapeRegister(ComponentID.GLTF_SHAPE, componentsFactory, componentsWriter);
 044            pointerDownRegister = new OnPointerDownRegister(ComponentID.ON_POINTER_DOWN, componentsFactory, componentsWr
 045            pointerUpRegister = new OnPointerUpRegister(ComponentID.ON_POINTER_UP, componentsFactory, componentsWriter);
 046            animatorRegister = new AnimatorRegister(ComponentID.ANIMATOR, componentsFactory, componentsWriter);
 047            billboardRegister = new BillboardRegister(ComponentID.BILLBOARD, componentsFactory, componentsWriter);
 048            avatarAttachRegister = new AvatarAttachRegister(ComponentID.AVATAR_ATTACH, componentsFactory, componentsWrit
 049            avatarModifierAreaRegister = new AvatarModifierAreaRegister(ComponentID.AVATAR_MODIFIER_AREA, componentsFact
 050            cameraModeAreaRegister = new CameraModeAreaRegister(ComponentID.CAMERA_MODE_AREA, componentsFactory, compone
 51
 52            // Components without a handler
 053            pointerDownResultRegister = new OnPointerDownResultRegister(ComponentID.ON_POINTER_DOWN_RESULT, componentsFa
 054            pointerUpResultRegister = new OnPointerUpResultRegister(ComponentID.ON_POINTER_UP_RESULT, componentsFactory,
 055        }
 56
 57        public void Dispose()
 58        {
 059            transformRegister.Dispose();
 060            sphereShapeRegister.Dispose();
 061            boxShapeRegister.Dispose();
 062            billboardRegister.Dispose();
 063            planeShapeRegister.Dispose();
 064            cylinderShapeRegister.Dispose();
 065            audioStreamRegister.Dispose();
 066            audioSourceRegister.Dispose();
 067            textShapeRegister.Dispose();
 068            nftRegister.Dispose();
 069            gltfRegister.Dispose();
 070            animatorRegister.Dispose();
 071            avatarAttachRegister.Dispose();
 072            avatarModifierAreaRegister.Dispose();
 073            pointerDownRegister.Dispose();
 074            pointerUpRegister.Dispose();
 075            cameraModeAreaRegister.Dispose();
 76
 77            // Components without a handler
 078            pointerDownResultRegister.Dispose();
 079            pointerUpResultRegister.Dispose();
 080        }
 81    }
 82}