Beispiel #1
0
        // private methods
        private string CreateMessageJson(CommandMessage message)
        {
            var textReader      = new StringReader("");
            var textWriter      = new StringWriter();
            var encoderSettings = new MessageEncoderSettings();
            var encoder         = new CommandMessageJsonEncoder(textReader, textWriter, encoderSettings);

            encoder.WriteMessage(message);
            return(textWriter.ToString());
        }
Beispiel #2
0
        /// <summary>
        /// Writes the message.
        /// </summary>
        /// <param name="message">The message.</param>
        public void WriteMessage(CommandResponseMessage message)
        {
            var wrappedMessage = message.WrappedMessage;

            _wrappedEncoder.WriteMessage(wrappedMessage);
        }