< Summary

Class:DCL.ECSComponents.CameraModeAreaSerializer
Assembly:DCL.ECSComponents.CameraModeArea
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/CameraModeArea/Serialization/CameraModeAreaSerializer.cs
Covered lines:6
Uncovered lines:0
Coverable lines:6
Total lines:21
Line coverage:100% (6 of 6)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Serialize(...)0%110100%
Deserialize(...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/CameraModeArea/Serialization/CameraModeAreaSerializer.cs

#LineLine coverage
 1using Google.Protobuf;
 2
 3namespace DCL.ECSComponents
 4{
 5    public static class CameraModeAreaSerializer
 6    {
 7        public static byte[] Serialize(PBCameraModeArea model)
 8        {
 19            int size = model.CalculateSize();
 110            byte[] buffer = new byte[size];
 111            CodedOutputStream output = new CodedOutputStream(buffer);
 112            model.WriteTo(output);
 113            return buffer;
 14        }
 15
 16        public static PBCameraModeArea Deserialize(object data)
 17        {
 118            return PBCameraModeArea.Parser.ParseFrom((byte[])data);
 19        }
 20    }
 21}