C# Class MailKit.BodyPart

An abstract body part of a message.
Each body part will actually be a BodyPartBasic, BodyPartText, BodyPartMessage, or BodyPartMultipart.
Show file Open project: jstedfast/MailKit Class Usage Examples

Public Methods

Method Description
Accept ( MailKit.BodyPartVisitor visitor ) : void

Dispatches to the specific visit method for this MIME body part.

This default implementation for MailKit.BodyPart nodes calls MailKit.BodyPartVisitor.VisitBodyPart. Override this method to call into a more specific method on a derived visitor class of the MailKit.BodyPartVisitor class. However, it should still support unknown visitors by calling MailKit.BodyPartVisitor.VisitBodyPart.

ToString ( ) : string

Returns a System.String that represents the current MailKit.BodyPart.

Returns a System.String that represents the current MailKit.BodyPart.

The syntax of the string returned, while similar to IMAP's BODYSTRUCTURE syntax, is not completely compatible.
TryParse ( string text, BodyPart &part ) : bool

Tries to parse the given text into a new MailKit.BodyPart instance.

Parses a body part from the specified text.

This syntax, while similar to IMAP's BODYSTRUCTURE syntax, is not completely compatible.

Protected Methods

Method Description
BodyPart ( ) : System

Initializes a new instance of the MailKit.BodyPart class.

Creates a new MailKit.BodyPart.

Encode ( StringBuilder builder ) : void

Encodes the BodyPart into the System.Text.StringBuilder.

Encodes the BodyPart into the System.Text.StringBuilder.

Private Methods

Method Description
Encode ( StringBuilder builder, BodyPart body ) : void
Encode ( StringBuilder builder, BodyPartCollection parts ) : void
Encode ( StringBuilder builder, MimeKit.ContentDisposition disposition ) : void
Encode ( StringBuilder builder, MimeKit.ContentType contentType ) : void
Encode ( StringBuilder builder, Envelope envelope ) : void
Encode ( StringBuilder builder, IList parameters ) : void
Encode ( StringBuilder builder, Uri location ) : void
Encode ( StringBuilder builder, string value ) : void
Encode ( StringBuilder builder, uint value ) : void
TryParse ( string text, int &index, MimeKit.ContentDisposition &disposition ) : bool
TryParse ( string text, int &index, IList &parameters ) : bool
TryParse ( string text, int &index, Uri &uri ) : bool
TryParse ( string text, int &index, bool multipart, MimeKit.ContentType &contentType ) : bool
TryParse ( string text, int &index, string &nstring ) : bool
TryParse ( string text, int &index, string path, BodyPart &part ) : bool
TryParse ( string text, int &index, string prefix, IList &children ) : bool
TryParse ( string text, int &index, uint &value ) : bool

Method Details

Accept() public method

Dispatches to the specific visit method for this MIME body part.
This default implementation for MailKit.BodyPart nodes calls MailKit.BodyPartVisitor.VisitBodyPart. Override this method to call into a more specific method on a derived visitor class of the MailKit.BodyPartVisitor class. However, it should still support unknown visitors by calling MailKit.BodyPartVisitor.VisitBodyPart.
/// is null. ///
public Accept ( MailKit.BodyPartVisitor visitor ) : void
visitor MailKit.BodyPartVisitor The visitor.
return void

BodyPart() protected method

Initializes a new instance of the MailKit.BodyPart class.
Creates a new MailKit.BodyPart.
protected BodyPart ( ) : System
return System

Encode() protected abstract method

Encodes the BodyPart into the System.Text.StringBuilder.
Encodes the BodyPart into the System.Text.StringBuilder.
protected abstract Encode ( StringBuilder builder ) : void
builder StringBuilder The string builder.
return void

ToString() public method

Returns a System.String that represents the current MailKit.BodyPart.

Returns a System.String that represents the current MailKit.BodyPart.

The syntax of the string returned, while similar to IMAP's BODYSTRUCTURE syntax, is not completely compatible.
public ToString ( ) : string
return string

TryParse() public static method

Tries to parse the given text into a new MailKit.BodyPart instance.

Parses a body part from the specified text.

This syntax, while similar to IMAP's BODYSTRUCTURE syntax, is not completely compatible.
/// is null. ///
public static TryParse ( string text, BodyPart &part ) : bool
text string The text to parse.
part BodyPart The parsed body part.
return bool