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);
 }
 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);
 }
        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);
        }