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