< Summary

Class:DCL.ECSComponents.TextShapeSerialization
Assembly:DCL.ECSComponents.TextShape
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/TextShape/Serliazer/TextShapeSerialization.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/TextShape/Serliazer/TextShapeSerialization.cs

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