Ejemplo n.º 1
0
        internal virtual void Send(BaseWriter writer, bool sendEnvelope, bool allowUnicode)
        {
            if (sendEnvelope)
            {
                PrepareEnvelopeHeaders(sendEnvelope, allowUnicode);
                writer.WriteHeaders(EnvelopeHeaders, allowUnicode);
            }

            PrepareHeaders(sendEnvelope, allowUnicode);
            writer.WriteHeaders(Headers, allowUnicode);

            if (Content != null)
            {
                Content.Send(writer, allowUnicode);
            }
            else
            {
                writer.GetContentStream().Close();
            }
        }