示例#1
0
 private static void WriteMultiUserDataMessage(ref MessagePackWriter writer, MultiUserDataMessage message)
 {
     writer.WriteArrayHeader(3);
     writer.Write(ServiceProtocolConstants.MultiUserDataMessageType);
     WriteStringArray(ref writer, message.UserList);
     WritePayloads(ref writer, message.Payloads);
 }
        private static MultiUserDataMessage CreateMultiUserDataMessage(ref MessagePackReader reader, int arrayLength)
        {
            var userList = ReadStringArray(ref reader, "userList");
            var payloads = ReadPayloads(ref reader);

            var result = new MultiUserDataMessage(userList, payloads);

            if (arrayLength >= 4)
            {
                result.ReadExtensionMembers(ref reader);
            }
            return(result);
        }