< Summary

Class:DCLPlugins.ECSComponents.OnPointerResultSerializer
Assembly:DCL.ECSComponents.OnPointerResult
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/Events/OnPointerResult/OnPointerResultSerializer.cs
Covered lines:0
Uncovered lines:12
Coverable lines:12
Total lines:36
Line coverage:0% (0 of 12)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Serialize(...)0%2100%
Serialize(...)0%2100%
DeserializeDown(...)0%2100%
DeserializeUp(...)0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/Events/OnPointerResult/OnPointerResultSerializer.cs

#LineLine coverage
 1using DCL.ECSComponents;
 2using Google.Protobuf;
 3
 4namespace DCLPlugins.ECSComponents
 5{
 6    public static class OnPointerResultSerializer
 7    {
 8        public static byte[] Serialize(PBOnPointerUpResult model)
 9        {
 010            int size = model.CalculateSize();
 011            byte[] buffer = new byte[size];
 012            CodedOutputStream output = new CodedOutputStream(buffer);
 013            model.WriteTo(output);
 014            return buffer;
 15        }
 16
 17        public static byte[] Serialize(PBOnPointerDownResult model)
 18        {
 019            int size = model.CalculateSize();
 020            byte[] buffer = new byte[size];
 021            CodedOutputStream output = new CodedOutputStream(buffer);
 022            model.WriteTo(output);
 023            return buffer;
 24        }
 25
 26        public static PBOnPointerDownResult DeserializeDown(object data)
 27        {
 028            return PBOnPointerDownResult.Parser.ParseFrom((byte[])data);
 29        }
 30
 31        public static PBOnPointerUpResult DeserializeUp(object data)
 32        {
 033            return PBOnPointerUpResult.Parser.ParseFrom((byte[])data);
 34        }
 35    }
 36}