| | 1 | | using DCL.ECSComponents; |
| | 2 | | using Google.Protobuf; |
| | 3 | |
|
| | 4 | | namespace DCLPlugins.ECS7.ECSComponents.Events.OnPointerDown.OnPointerUp.Serializer |
| | 5 | | { |
| | 6 | | public class OnPointerUpSerializer |
| | 7 | | { |
| | 8 | | public static byte[] Serialize(PBOnPointerUp model) |
| | 9 | | { |
| 0 | 10 | | int size = model.CalculateSize(); |
| 0 | 11 | | byte[] buffer = new byte[size]; |
| 0 | 12 | | CodedOutputStream output = new CodedOutputStream(buffer); |
| 0 | 13 | | model.WriteTo(output); |
| 0 | 14 | | return buffer; |
| | 15 | | } |
| | 16 | |
|
| 4 | 17 | | public static PBOnPointerUp Deserialize(object data) { return PBOnPointerUp.Parser.ParseFrom((byte[])data); } |
| | 18 | | } |
| | 19 | | } |