コード例 #1
0
 private static void WriteAckMessage(ref MessagePackWriter writer, AckMessage message)
 {
     writer.WriteArrayHeader(4);
     writer.Write(ServiceProtocolConstants.AckMessageType);
     writer.Write(message.AckId);
     writer.Write(message.Status);
     writer.Write(message.Message);
 }
コード例 #2
0
 private static void WriteAckMessage(ref MessagePackWriter writer, AckMessage message)
 {
     writer.WriteArrayHeader(5);
     writer.Write(ServiceProtocolConstants.AckMessageType);
     writer.Write(message.AckId);
     writer.Write(message.Status);
     writer.Write(message.Message);
     message.WriteExtensionMembers(ref writer);
 }
コード例 #3
0
        private static AckMessage CreateAckMessage(ref MessagePackReader reader, int arrayLength)
        {
            var ackId   = ReadInt32(ref reader, "ackId");
            var status  = ReadInt32(ref reader, "status");
            var message = ReadString(ref reader, "message");

            var result = new AckMessage(ackId, status, message);

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