private void WriteUnencryptedRequestMessageToStream(
            Stream stream,
            CommandRequestMessage unencryptedRequestMessage)
        {
            var clonedMessageEncoderSettings = _messageEncoderSettings.Clone();
            var encoderFactory = new BinaryMessageEncoderFactory(stream, clonedMessageEncoderSettings, compressorSource: null);
            var encoder        = encoderFactory.GetCommandRequestMessageEncoder();

            encoder.WriteMessage(unencryptedRequestMessage);
        }
예제 #2
0
        private void WriteUnencryptedRequestMessageToStream(
            Stream stream,
            CommandRequestMessage unencryptedRequestMessage)
        {
            var clonedMessageEncoderSettings = _messageEncoderSettings.Clone();

            clonedMessageEncoderSettings.Set(MessageEncoderSettingsName.MaxDocumentSize, 2097152);
            clonedMessageEncoderSettings.Set(MessageEncoderSettingsName.MaxMessageSize, 2097152 + 16384);
            var encoderFactory = new BinaryMessageEncoderFactory(stream, clonedMessageEncoderSettings, compressorSource: null);
            var encoder        = encoderFactory.GetCommandRequestMessageEncoder();

            encoder.WriteMessage(unencryptedRequestMessage);
        }