Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma warning disable 618
- #pragma warning disable 612
- #pragma warning disable 414
- #pragma warning disable 168
- namespace MessagePack.Resolvers
- {
- using System;
- using MessagePack;
- public class GeneratedResolver : global::MessagePack.IFormatterResolver
- {
- public static readonly global::MessagePack.IFormatterResolver Instance = new GeneratedResolver();
- GeneratedResolver()
- {
- }
- public global::MessagePack.Formatters.IMessagePackFormatter<T> GetFormatter<T>()
- {
- return FormatterCache<T>.formatter;
- }
- static class FormatterCache<T>
- {
- public static readonly global::MessagePack.Formatters.IMessagePackFormatter<T> formatter;
- static FormatterCache()
- {
- var f = GeneratedResolverGetFormatterHelper.GetFormatter(typeof(T));
- if (f != null)
- {
- formatter = (global::MessagePack.Formatters.IMessagePackFormatter<T>)f;
- }
- }
- }
- }
- internal static class GeneratedResolverGetFormatterHelper
- {
- static readonly global::System.Collections.Generic.Dictionary<Type, int> lookup;
- static GeneratedResolverGetFormatterHelper()
- {
- lookup = new global::System.Collections.Generic.Dictionary<Type, int>(14)
- {
- {typeof(global::AzurInteractiveGames.KingOfSails.Share.Client.Spawn[]), 0 },
- {typeof(global::System.Collections.Generic.Dictionary<int, global::AzurInteractiveGames.KingOfSails.Share.Client.EntitySync>), 1 },
- {typeof(global::System.Collections.Generic.Dictionary<int, global::AzurInteractiveGames.KingOfSails.Share.Client.EntityInputSync>), 2 },
- {typeof(global::AzurInteractiveGames.KingOfSails.Share.Client.MatchMode), 3 },
- {typeof(global::AzurInteractiveGames.KingOfSails.Share.Client.ResponseStatus), 4 },
- {typeof(global::AzurInteractiveGames.KingOfSails.Share.Client.EntitySync), 5 },
- {typeof(global::AzurInteractiveGames.KingOfSails.Share.Client.EntityInputSync), 6 },
- {typeof(global::AzurInteractiveGames.KingOfSails.Share.Client.Spawn), 7 },
- {typeof(global::AzurInteractiveGames.KingOfSails.Share.Client.SpawnData), 8 },
- {typeof(global::AzurInteractiveGames.KingOfSails.Share.Client.BattleResult), 9 },
- {typeof(global::AzurInteractiveGames.KingOfSails.Share.Client.JoinBattleRequest), 10 },
- {typeof(global::AzurInteractiveGames.KingOfSails.Share.Client.JoinBattleResponse), 11 },
- {typeof(global::AzurInteractiveGames.KingOfSails.Share.Client.UpdateBattleResponse), 12 },
- {typeof(global::AzurInteractiveGames.KingOfSails.Share.Client.UpdateBattleInputResponse), 13 },
- };
- }
- internal static object GetFormatter(Type t)
- {
- int key;
- if (!lookup.TryGetValue(t, out key)) return null;
- switch (key)
- {
- case 0: return new global::MessagePack.Formatters.ArrayFormatter<global::AzurInteractiveGames.KingOfSails.Share.Client.Spawn>();
- case 1: return new global::MessagePack.Formatters.DictionaryFormatter<int, global::AzurInteractiveGames.KingOfSails.Share.Client.EntitySync>();
- case 2: return new global::MessagePack.Formatters.DictionaryFormatter<int, global::AzurInteractiveGames.KingOfSails.Share.Client.EntityInputSync>();
- case 3: return new MessagePack.Formatters.AzurInteractiveGames.KingOfSails.Share.Client.MatchModeFormatter();
- case 4: return new MessagePack.Formatters.AzurInteractiveGames.KingOfSails.Share.Client.ResponseStatusFormatter();
- case 5: return new MessagePack.Formatters.AzurInteractiveGames.KingOfSails.Share.Client.EntitySyncFormatter();
- case 6: return new MessagePack.Formatters.AzurInteractiveGames.KingOfSails.Share.Client.EntityInputSyncFormatter();
- case 7: return new MessagePack.Formatters.AzurInteractiveGames.KingOfSails.Share.Client.SpawnFormatter();
- case 8: return new MessagePack.Formatters.AzurInteractiveGames.KingOfSails.Share.Client.SpawnDataFormatter();
- case 9: return new MessagePack.Formatters.AzurInteractiveGames.KingOfSails.Share.Client.BattleResultFormatter();
- case 10: return new MessagePack.Formatters.AzurInteractiveGames.KingOfSails.Share.Client.JoinBattleRequestFormatter();
- case 11: return new MessagePack.Formatters.AzurInteractiveGames.KingOfSails.Share.Client.JoinBattleResponseFormatter();
- case 12: return new MessagePack.Formatters.AzurInteractiveGames.KingOfSails.Share.Client.UpdateBattleResponseFormatter();
- case 13: return new MessagePack.Formatters.AzurInteractiveGames.KingOfSails.Share.Client.UpdateBattleInputResponseFormatter();
- default: return null;
- }
- }
- }
- }
- #pragma warning restore 168
- #pragma warning restore 414
- #pragma warning restore 618
- #pragma warning restore 612
- #pragma warning disable 618
- #pragma warning disable 612
- #pragma warning disable 414
- #pragma warning disable 168
- namespace MessagePack.Formatters.AzurInteractiveGames.KingOfSails.Share.Client
- {
- using System;
- using MessagePack;
- public sealed class MatchModeFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::AzurInteractiveGames.KingOfSails.Share.Client.MatchMode>
- {
- public int Serialize(ref byte[] bytes, int offset, global::AzurInteractiveGames.KingOfSails.Share.Client.MatchMode value, global::MessagePack.IFormatterResolver formatterResolver)
- {
- return MessagePackBinary.WriteByte(ref bytes, offset, (Byte)value);
- }
- public global::AzurInteractiveGames.KingOfSails.Share.Client.MatchMode Deserialize(byte[] bytes, int offset, global::MessagePack.IFormatterResolver formatterResolver, out int readSize)
- {
- return (global::AzurInteractiveGames.KingOfSails.Share.Client.MatchMode)MessagePackBinary.ReadByte(bytes, offset, out readSize);
- }
- }
- public sealed class ResponseStatusFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::AzurInteractiveGames.KingOfSails.Share.Client.ResponseStatus>
- {
- public int Serialize(ref byte[] bytes, int offset, global::AzurInteractiveGames.KingOfSails.Share.Client.ResponseStatus value, global::MessagePack.IFormatterResolver formatterResolver)
- {
- return MessagePackBinary.WriteByte(ref bytes, offset, (Byte)value);
- }
- public global::AzurInteractiveGames.KingOfSails.Share.Client.ResponseStatus Deserialize(byte[] bytes, int offset, global::MessagePack.IFormatterResolver formatterResolver, out int readSize)
- {
- return (global::AzurInteractiveGames.KingOfSails.Share.Client.ResponseStatus)MessagePackBinary.ReadByte(bytes, offset, out readSize);
- }
- }
- }
- #pragma warning restore 168
- #pragma warning restore 414
- #pragma warning restore 618
- #pragma warning restore 612
- #pragma warning disable 618
- #pragma warning disable 612
- #pragma warning disable 414
- #pragma warning disable 168
- namespace MessagePack.Formatters.AzurInteractiveGames.KingOfSails.Share.Client
- {
- using System;
- using MessagePack;
- public sealed class EntitySyncFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::AzurInteractiveGames.KingOfSails.Share.Client.EntitySync>
- {
- public int Serialize(ref byte[] bytes, int offset, global::AzurInteractiveGames.KingOfSails.Share.Client.EntitySync value, global::MessagePack.IFormatterResolver formatterResolver)
- {
- var startOffset = offset;
- offset += global::MessagePack.MessagePackBinary.WriteFixedArrayHeaderUnsafe(ref bytes, offset, 2);
- offset += formatterResolver.GetFormatterWithVerify<global::UnityEngine.Vector3>().Serialize(ref bytes, offset, value.Position, formatterResolver);
- offset += formatterResolver.GetFormatterWithVerify<global::UnityEngine.Quaternion>().Serialize(ref bytes, offset, value.Rotation, formatterResolver);
- return offset - startOffset;
- }
- public global::AzurInteractiveGames.KingOfSails.Share.Client.EntitySync Deserialize(byte[] bytes, int offset, global::MessagePack.IFormatterResolver formatterResolver, out int readSize)
- {
- if (global::MessagePack.MessagePackBinary.IsNil(bytes, offset))
- {
- throw new InvalidOperationException("typecode is null, struct not supported");
- }
- var startOffset = offset;
- var length = global::MessagePack.MessagePackBinary.ReadArrayHeader(bytes, offset, out readSize);
- offset += readSize;
- var __Position__ = default(global::UnityEngine.Vector3);
- var __Rotation__ = default(global::UnityEngine.Quaternion);
- for (int i = 0; i < length; i++)
- {
- var key = i;
- switch (key)
- {
- case 0:
- __Position__ = formatterResolver.GetFormatterWithVerify<global::UnityEngine.Vector3>().Deserialize(bytes, offset, formatterResolver, out readSize);
- break;
- case 1:
- __Rotation__ = formatterResolver.GetFormatterWithVerify<global::UnityEngine.Quaternion>().Deserialize(bytes, offset, formatterResolver, out readSize);
- break;
- default:
- readSize = global::MessagePack.MessagePackBinary.ReadNextBlock(bytes, offset);
- break;
- }
- offset += readSize;
- }
- readSize = offset - startOffset;
- var ____result = new global::AzurInteractiveGames.KingOfSails.Share.Client.EntitySync();
- ____result.Position = __Position__;
- ____result.Rotation = __Rotation__;
- return ____result;
- }
- }
- public sealed class EntityInputSyncFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::AzurInteractiveGames.KingOfSails.Share.Client.EntityInputSync>
- {
- public int Serialize(ref byte[] bytes, int offset, global::AzurInteractiveGames.KingOfSails.Share.Client.EntityInputSync value, global::MessagePack.IFormatterResolver formatterResolver)
- {
- var startOffset = offset;
- offset += global::MessagePack.MessagePackBinary.WriteFixedArrayHeaderUnsafe(ref bytes, offset, 2);
- offset += MessagePackBinary.WriteSingle(ref bytes, offset, value.Speed);
- offset += MessagePackBinary.WriteSingle(ref bytes, offset, value.Steer);
- return offset - startOffset;
- }
- public global::AzurInteractiveGames.KingOfSails.Share.Client.EntityInputSync Deserialize(byte[] bytes, int offset, global::MessagePack.IFormatterResolver formatterResolver, out int readSize)
- {
- if (global::MessagePack.MessagePackBinary.IsNil(bytes, offset))
- {
- throw new InvalidOperationException("typecode is null, struct not supported");
- }
- var startOffset = offset;
- var length = global::MessagePack.MessagePackBinary.ReadArrayHeader(bytes, offset, out readSize);
- offset += readSize;
- var __Speed__ = default(float);
- var __Steer__ = default(float);
- for (int i = 0; i < length; i++)
- {
- var key = i;
- switch (key)
- {
- case 0:
- __Speed__ = MessagePackBinary.ReadSingle(bytes, offset, out readSize);
- break;
- case 1:
- __Steer__ = MessagePackBinary.ReadSingle(bytes, offset, out readSize);
- break;
- default:
- readSize = global::MessagePack.MessagePackBinary.ReadNextBlock(bytes, offset);
- break;
- }
- offset += readSize;
- }
- readSize = offset - startOffset;
- var ____result = new global::AzurInteractiveGames.KingOfSails.Share.Client.EntityInputSync();
- ____result.Speed = __Speed__;
- ____result.Steer = __Steer__;
- return ____result;
- }
- }
- public sealed class SpawnFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::AzurInteractiveGames.KingOfSails.Share.Client.Spawn>
- {
- public int Serialize(ref byte[] bytes, int offset, global::AzurInteractiveGames.KingOfSails.Share.Client.Spawn value, global::MessagePack.IFormatterResolver formatterResolver)
- {
- var startOffset = offset;
- offset += global::MessagePack.MessagePackBinary.WriteFixedArrayHeaderUnsafe(ref bytes, offset, 6);
- offset += MessagePackBinary.WriteInt32(ref bytes, offset, value.OwnerId);
- offset += MessagePackBinary.WriteByte(ref bytes, offset, value.SpawnId);
- offset += MessagePackBinary.WriteInt32(ref bytes, offset, value.ShipId);
- offset += MessagePackBinary.WriteInt32(ref bytes, offset, value.Team);
- offset += MessagePackBinary.WriteInt32(ref bytes, offset, value.EntityId);
- offset += MessagePackBinary.WriteBoolean(ref bytes, offset, value.IsBot);
- return offset - startOffset;
- }
- public global::AzurInteractiveGames.KingOfSails.Share.Client.Spawn Deserialize(byte[] bytes, int offset, global::MessagePack.IFormatterResolver formatterResolver, out int readSize)
- {
- if (global::MessagePack.MessagePackBinary.IsNil(bytes, offset))
- {
- throw new InvalidOperationException("typecode is null, struct not supported");
- }
- var startOffset = offset;
- var length = global::MessagePack.MessagePackBinary.ReadArrayHeader(bytes, offset, out readSize);
- offset += readSize;
- var __OwnerId__ = default(int);
- var __SpawnId__ = default(byte);
- var __ShipId__ = default(int);
- var __Team__ = default(int);
- var __EntityId__ = default(int);
- var __IsBot__ = default(bool);
- for (int i = 0; i < length; i++)
- {
- var key = i;
- switch (key)
- {
- case 0:
- __OwnerId__ = MessagePackBinary.ReadInt32(bytes, offset, out readSize);
- break;
- case 1:
- __SpawnId__ = MessagePackBinary.ReadByte(bytes, offset, out readSize);
- break;
- case 2:
- __ShipId__ = MessagePackBinary.ReadInt32(bytes, offset, out readSize);
- break;
- case 3:
- __Team__ = MessagePackBinary.ReadInt32(bytes, offset, out readSize);
- break;
- case 4:
- __EntityId__ = MessagePackBinary.ReadInt32(bytes, offset, out readSize);
- break;
- case 5:
- __IsBot__ = MessagePackBinary.ReadBoolean(bytes, offset, out readSize);
- break;
- default:
- readSize = global::MessagePack.MessagePackBinary.ReadNextBlock(bytes, offset);
- break;
- }
- offset += readSize;
- }
- readSize = offset - startOffset;
- var ____result = new global::AzurInteractiveGames.KingOfSails.Share.Client.Spawn();
- ____result.OwnerId = __OwnerId__;
- ____result.SpawnId = __SpawnId__;
- ____result.ShipId = __ShipId__;
- ____result.Team = __Team__;
- ____result.EntityId = __EntityId__;
- ____result.IsBot = __IsBot__;
- return ____result;
- }
- }
- public sealed class SpawnDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::AzurInteractiveGames.KingOfSails.Share.Client.SpawnData>
- {
- public int Serialize(ref byte[] bytes, int offset, global::AzurInteractiveGames.KingOfSails.Share.Client.SpawnData value, global::MessagePack.IFormatterResolver formatterResolver)
- {
- var startOffset = offset;
- offset += global::MessagePack.MessagePackBinary.WriteFixedArrayHeaderUnsafe(ref bytes, offset, 1);
- offset += formatterResolver.GetFormatterWithVerify<global::AzurInteractiveGames.KingOfSails.Share.Client.Spawn[]>().Serialize(ref bytes, offset, value.Entities, formatterResolver);
- return offset - startOffset;
- }
- public global::AzurInteractiveGames.KingOfSails.Share.Client.SpawnData Deserialize(byte[] bytes, int offset, global::MessagePack.IFormatterResolver formatterResolver, out int readSize)
- {
- if (global::MessagePack.MessagePackBinary.IsNil(bytes, offset))
- {
- throw new InvalidOperationException("typecode is null, struct not supported");
- }
- var startOffset = offset;
- var length = global::MessagePack.MessagePackBinary.ReadArrayHeader(bytes, offset, out readSize);
- offset += readSize;
- var __Entities__ = default(global::AzurInteractiveGames.KingOfSails.Share.Client.Spawn[]);
- for (int i = 0; i < length; i++)
- {
- var key = i;
- switch (key)
- {
- case 0:
- __Entities__ = formatterResolver.GetFormatterWithVerify<global::AzurInteractiveGames.KingOfSails.Share.Client.Spawn[]>().Deserialize(bytes, offset, formatterResolver, out readSize);
- break;
- default:
- readSize = global::MessagePack.MessagePackBinary.ReadNextBlock(bytes, offset);
- break;
- }
- offset += readSize;
- }
- readSize = offset - startOffset;
- var ____result = new global::AzurInteractiveGames.KingOfSails.Share.Client.SpawnData();
- ____result.Entities = __Entities__;
- return ____result;
- }
- }
- public sealed class BattleResultFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::AzurInteractiveGames.KingOfSails.Share.Client.BattleResult>
- {
- public int Serialize(ref byte[] bytes, int offset, global::AzurInteractiveGames.KingOfSails.Share.Client.BattleResult value, global::MessagePack.IFormatterResolver formatterResolver)
- {
- var startOffset = offset;
- offset += global::MessagePack.MessagePackBinary.WriteFixedArrayHeaderUnsafe(ref bytes, offset, 1);
- offset += formatterResolver.GetFormatterWithVerify<string>().Serialize(ref bytes, offset, value.test, formatterResolver);
- return offset - startOffset;
- }
- public global::AzurInteractiveGames.KingOfSails.Share.Client.BattleResult Deserialize(byte[] bytes, int offset, global::MessagePack.IFormatterResolver formatterResolver, out int readSize)
- {
- if (global::MessagePack.MessagePackBinary.IsNil(bytes, offset))
- {
- throw new InvalidOperationException("typecode is null, struct not supported");
- }
- var startOffset = offset;
- var length = global::MessagePack.MessagePackBinary.ReadArrayHeader(bytes, offset, out readSize);
- offset += readSize;
- var __test__ = default(string);
- for (int i = 0; i < length; i++)
- {
- var key = i;
- switch (key)
- {
- case 0:
- __test__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(bytes, offset, formatterResolver, out readSize);
- break;
- default:
- readSize = global::MessagePack.MessagePackBinary.ReadNextBlock(bytes, offset);
- break;
- }
- offset += readSize;
- }
- readSize = offset - startOffset;
- var ____result = new global::AzurInteractiveGames.KingOfSails.Share.Client.BattleResult();
- ____result.test = __test__;
- return ____result;
- }
- }
- public sealed class JoinBattleRequestFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::AzurInteractiveGames.KingOfSails.Share.Client.JoinBattleRequest>
- {
- public int Serialize(ref byte[] bytes, int offset, global::AzurInteractiveGames.KingOfSails.Share.Client.JoinBattleRequest value, global::MessagePack.IFormatterResolver formatterResolver)
- {
- var startOffset = offset;
- offset += global::MessagePack.MessagePackBinary.WriteFixedArrayHeaderUnsafe(ref bytes, offset, 3);
- offset += formatterResolver.GetFormatterWithVerify<string>().Serialize(ref bytes, offset, value.Token, formatterResolver);
- offset += MessagePackBinary.WriteInt32(ref bytes, offset, value.ShipId);
- offset += formatterResolver.GetFormatterWithVerify<global::AzurInteractiveGames.KingOfSails.Share.Client.MatchMode>().Serialize(ref bytes, offset, value.Mode, formatterResolver);
- return offset - startOffset;
- }
- public global::AzurInteractiveGames.KingOfSails.Share.Client.JoinBattleRequest Deserialize(byte[] bytes, int offset, global::MessagePack.IFormatterResolver formatterResolver, out int readSize)
- {
- if (global::MessagePack.MessagePackBinary.IsNil(bytes, offset))
- {
- throw new InvalidOperationException("typecode is null, struct not supported");
- }
- var startOffset = offset;
- var length = global::MessagePack.MessagePackBinary.ReadArrayHeader(bytes, offset, out readSize);
- offset += readSize;
- var __Token__ = default(string);
- var __ShipId__ = default(int);
- var __Mode__ = default(global::AzurInteractiveGames.KingOfSails.Share.Client.MatchMode);
- for (int i = 0; i < length; i++)
- {
- var key = i;
- switch (key)
- {
- case 0:
- __Token__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(bytes, offset, formatterResolver, out readSize);
- break;
- case 1:
- __ShipId__ = MessagePackBinary.ReadInt32(bytes, offset, out readSize);
- break;
- case 2:
- __Mode__ = formatterResolver.GetFormatterWithVerify<global::AzurInteractiveGames.KingOfSails.Share.Client.MatchMode>().Deserialize(bytes, offset, formatterResolver, out readSize);
- break;
- default:
- readSize = global::MessagePack.MessagePackBinary.ReadNextBlock(bytes, offset);
- break;
- }
- offset += readSize;
- }
- readSize = offset - startOffset;
- var ____result = new global::AzurInteractiveGames.KingOfSails.Share.Client.JoinBattleRequest();
- ____result.Token = __Token__;
- ____result.ShipId = __ShipId__;
- ____result.Mode = __Mode__;
- return ____result;
- }
- }
- public sealed class JoinBattleResponseFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::AzurInteractiveGames.KingOfSails.Share.Client.JoinBattleResponse>
- {
- public int Serialize(ref byte[] bytes, int offset, global::AzurInteractiveGames.KingOfSails.Share.Client.JoinBattleResponse value, global::MessagePack.IFormatterResolver formatterResolver)
- {
- var startOffset = offset;
- offset += global::MessagePack.MessagePackBinary.WriteFixedArrayHeaderUnsafe(ref bytes, offset, 4);
- offset += formatterResolver.GetFormatterWithVerify<global::AzurInteractiveGames.KingOfSails.Share.Client.ResponseStatus>().Serialize(ref bytes, offset, value.Status, formatterResolver);
- offset += formatterResolver.GetFormatterWithVerify<string>().Serialize(ref bytes, offset, value.Description, formatterResolver);
- offset += MessagePackBinary.WriteInt32(ref bytes, offset, value.Id);
- offset += MessagePackBinary.WriteInt32(ref bytes, offset, value.Timer);
- return offset - startOffset;
- }
- public global::AzurInteractiveGames.KingOfSails.Share.Client.JoinBattleResponse Deserialize(byte[] bytes, int offset, global::MessagePack.IFormatterResolver formatterResolver, out int readSize)
- {
- if (global::MessagePack.MessagePackBinary.IsNil(bytes, offset))
- {
- throw new InvalidOperationException("typecode is null, struct not supported");
- }
- var startOffset = offset;
- var length = global::MessagePack.MessagePackBinary.ReadArrayHeader(bytes, offset, out readSize);
- offset += readSize;
- var __Status__ = default(global::AzurInteractiveGames.KingOfSails.Share.Client.ResponseStatus);
- var __Description__ = default(string);
- var __Id__ = default(int);
- var __Timer__ = default(int);
- for (int i = 0; i < length; i++)
- {
- var key = i;
- switch (key)
- {
- case 0:
- __Status__ = formatterResolver.GetFormatterWithVerify<global::AzurInteractiveGames.KingOfSails.Share.Client.ResponseStatus>().Deserialize(bytes, offset, formatterResolver, out readSize);
- break;
- case 1:
- __Description__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(bytes, offset, formatterResolver, out readSize);
- break;
- case 2:
- __Id__ = MessagePackBinary.ReadInt32(bytes, offset, out readSize);
- break;
- case 3:
- __Timer__ = MessagePackBinary.ReadInt32(bytes, offset, out readSize);
- break;
- default:
- readSize = global::MessagePack.MessagePackBinary.ReadNextBlock(bytes, offset);
- break;
- }
- offset += readSize;
- }
- readSize = offset - startOffset;
- var ____result = new global::AzurInteractiveGames.KingOfSails.Share.Client.JoinBattleResponse();
- ____result.Status = __Status__;
- ____result.Description = __Description__;
- ____result.Id = __Id__;
- ____result.Timer = __Timer__;
- return ____result;
- }
- }
- public sealed class UpdateBattleResponseFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::AzurInteractiveGames.KingOfSails.Share.Client.UpdateBattleResponse>
- {
- public int Serialize(ref byte[] bytes, int offset, global::AzurInteractiveGames.KingOfSails.Share.Client.UpdateBattleResponse value, global::MessagePack.IFormatterResolver formatterResolver)
- {
- var startOffset = offset;
- offset += global::MessagePack.MessagePackBinary.WriteFixedArrayHeaderUnsafe(ref bytes, offset, 1);
- offset += formatterResolver.GetFormatterWithVerify<global::System.Collections.Generic.Dictionary<int, global::AzurInteractiveGames.KingOfSails.Share.Client.EntitySync>>().Serialize(ref bytes, offset, value.Entities, formatterResolver);
- return offset - startOffset;
- }
- public global::AzurInteractiveGames.KingOfSails.Share.Client.UpdateBattleResponse Deserialize(byte[] bytes, int offset, global::MessagePack.IFormatterResolver formatterResolver, out int readSize)
- {
- if (global::MessagePack.MessagePackBinary.IsNil(bytes, offset))
- {
- throw new InvalidOperationException("typecode is null, struct not supported");
- }
- var startOffset = offset;
- var length = global::MessagePack.MessagePackBinary.ReadArrayHeader(bytes, offset, out readSize);
- offset += readSize;
- var __Entities__ = default(global::System.Collections.Generic.Dictionary<int, global::AzurInteractiveGames.KingOfSails.Share.Client.EntitySync>);
- for (int i = 0; i < length; i++)
- {
- var key = i;
- switch (key)
- {
- case 0:
- __Entities__ = formatterResolver.GetFormatterWithVerify<global::System.Collections.Generic.Dictionary<int, global::AzurInteractiveGames.KingOfSails.Share.Client.EntitySync>>().Deserialize(bytes, offset, formatterResolver, out readSize);
- break;
- default:
- readSize = global::MessagePack.MessagePackBinary.ReadNextBlock(bytes, offset);
- break;
- }
- offset += readSize;
- }
- readSize = offset - startOffset;
- var ____result = new global::AzurInteractiveGames.KingOfSails.Share.Client.UpdateBattleResponse();
- ____result.Entities = __Entities__;
- return ____result;
- }
- }
- public sealed class UpdateBattleInputResponseFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::AzurInteractiveGames.KingOfSails.Share.Client.UpdateBattleInputResponse>
- {
- public int Serialize(ref byte[] bytes, int offset, global::AzurInteractiveGames.KingOfSails.Share.Client.UpdateBattleInputResponse value, global::MessagePack.IFormatterResolver formatterResolver)
- {
- var startOffset = offset;
- offset += global::MessagePack.MessagePackBinary.WriteFixedArrayHeaderUnsafe(ref bytes, offset, 1);
- offset += formatterResolver.GetFormatterWithVerify<global::System.Collections.Generic.Dictionary<int, global::AzurInteractiveGames.KingOfSails.Share.Client.EntityInputSync>>().Serialize(ref bytes, offset, value.Entities, formatterResolver);
- return offset - startOffset;
- }
- public global::AzurInteractiveGames.KingOfSails.Share.Client.UpdateBattleInputResponse Deserialize(byte[] bytes, int offset, global::MessagePack.IFormatterResolver formatterResolver, out int readSize)
- {
- if (global::MessagePack.MessagePackBinary.IsNil(bytes, offset))
- {
- throw new InvalidOperationException("typecode is null, struct not supported");
- }
- var startOffset = offset;
- var length = global::MessagePack.MessagePackBinary.ReadArrayHeader(bytes, offset, out readSize);
- offset += readSize;
- var __Entities__ = default(global::System.Collections.Generic.Dictionary<int, global::AzurInteractiveGames.KingOfSails.Share.Client.EntityInputSync>);
- for (int i = 0; i < length; i++)
- {
- var key = i;
- switch (key)
- {
- case 0:
- __Entities__ = formatterResolver.GetFormatterWithVerify<global::System.Collections.Generic.Dictionary<int, global::AzurInteractiveGames.KingOfSails.Share.Client.EntityInputSync>>().Deserialize(bytes, offset, formatterResolver, out readSize);
- break;
- default:
- readSize = global::MessagePack.MessagePackBinary.ReadNextBlock(bytes, offset);
- break;
- }
- offset += readSize;
- }
- readSize = offset - startOffset;
- var ____result = new global::AzurInteractiveGames.KingOfSails.Share.Client.UpdateBattleInputResponse();
- ____result.Entities = __Entities__;
- return ____result;
- }
- }
- }
- #pragma warning restore 168
- #pragma warning restore 414
- #pragma warning restore 618
- #pragma warning restore 612
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement