public byte[] ToBytes() { var msgpack = new SimpleMsgPack.MsgPack(); msgpack.ForcePathObject("UserID").AsString = UserID; msgpack.ForcePathObject("UserPW").AsString = UserPW; byte[] packData = msgpack.Encode2Bytes(); return(packData); }
public bool FromBytes(byte[] bodyData) { var unpack_msgpack = new SimpleMsgPack.MsgPack(); unpack_msgpack.DecodeFromBytes(bodyData); Result = unpack_msgpack.ForcePathObject("Result").AsInteger; RoomUserUniqueId = (UInt64)unpack_msgpack.ForcePathObject("RoomUserUniqueId").AsInteger; return(true); }
public bool FromBytes(byte[] bodyData) { var unpack_msgpack = new SimpleMsgPack.MsgPack(); unpack_msgpack.DecodeFromBytes(bodyData); UserUniqueId = (UInt64)unpack_msgpack.ForcePathObject("UserUniqueId").AsInteger; Msg = unpack_msgpack.ForcePathObject("Msg").AsString; return(true); }
public byte[] ToBytes() { var msgpack = new SimpleMsgPack.MsgPack(); msgpack.ForcePathObject("RoomNumber").AsInteger = RoomNumber; byte[] packData = msgpack.Encode2Bytes(); return(packData); }
public bool FromBytes(byte[] bodyData) { var unpack_msgpack = new SimpleMsgPack.MsgPack(); unpack_msgpack.DecodeFromBytes(bodyData); ErrorCode = (ERROR_CODE)unpack_msgpack.ForcePathObject("ErrorCode").AsInteger; return(true); }
public bool FromBytes(byte[] bodyData) { var unpack_msgpack = new SimpleMsgPack.MsgPack(); unpack_msgpack.DecodeFromBytes(bodyData); UserCount = unpack_msgpack.ForcePathObject("UserCount").AsInteger; foreach (SimpleMsgPack.MsgPack item in unpack_msgpack.ForcePathObject("UniqueId")) { UserUniqueIdList.Add((UInt64)item.GetAsInteger()); } foreach (SimpleMsgPack.MsgPack item in unpack_msgpack.ForcePathObject("ID")) { UserIDList.Add(item.AsString); } return(true); }