1. public override ArraySegment<byte> WriteMessage(Message message, int maxMessageSize, BufferManager bufferManager, int messageOffset)
  2. {
  3.     if (this.ShouldWriteMtom(message))
  4.     {
  5.         return this.mtomEncoder.WriteMessage(message, maxMessageSize, bufferManager, messageOffset);
  6.     }
  7.     else
  8.     {
  9.         return this.textEncoder.WriteMessage(message, maxMessageSize, bufferManager, messageOffset);
  10.     }
  11. }