public interface IMessageBuilder

Summary

Interface for constructing application messages.

Remarks

Subinterfaces provide specialized data-writing methods. This base interface deals with the lowest common denominator: bytes, with no special encodings for higher-level objects.

Property Summary

Type Name Summary
Stream BodyStream (r)

Retrieve the Stream being used to construct the message body.

IDictionary Headers (r)

Retrieves the dictionary that will be used to construct the message header table.

Method Summary

Name Summary
byte[] GetContentBody()

Finish and retrieve the content body for transmission.

IContentHeader GetContentHeader()

Finish and retrieve the content header for transmission.

string GetDefaultContentType()

Returns the default MIME content type for messages this instance constructs, or null if none is available or relevant.

IMessageBuilder RawWrite(byte b)

Write a single byte into the message body, without encoding or interpretation.

IMessageBuilder RawWrite(byte[] bytes)

Write a byte array into the message body, without encoding or interpretation.

IMessageBuilder RawWrite(byte[] bytes, int offset, int length)

Write a section of a byte array into the message body, without encoding or interpretation.

Property Detail

Stream BodyStream (r)

Summary

Retrieve the Stream being used to construct the message body.

IDictionary Headers (r)

Summary

Retrieves the dictionary that will be used to construct the message header table.

Method Detail

GetContentBody

byte[] GetContentBody()

Return type byte[]

Summary

Finish and retrieve the content body for transmission.

GetContentHeader

IContentHeader GetContentHeader()

Return type IContentHeader

Summary

Finish and retrieve the content header for transmission.

GetDefaultContentType

string GetDefaultContentType()

Return type string

Summary

Returns the default MIME content type for messages this instance constructs, or null if none is available or relevant.

RawWrite

IMessageBuilder RawWrite(byte b)

Return type IMessageBuilder
Parameters
Name Type
b byte

Summary

Write a single byte into the message body, without encoding or interpretation.

RawWrite

IMessageBuilder RawWrite(byte[] bytes)

Return type IMessageBuilder
Parameters
Name Type
bytes byte[]

Summary

Write a byte array into the message body, without encoding or interpretation.

RawWrite

IMessageBuilder RawWrite(byte[] bytes, int offset, int length)

Return type IMessageBuilder
Parameters
Name Type
bytes byte[]
offset int
length int

Summary

Write a section of a byte array into the message body, without encoding or interpretation.