C# Class MailKit.BodyPart

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

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode 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 méthode

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.
Résultat void

BodyPart() protected méthode

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

Encode() protected abstract méthode

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.
Résultat void

ToString() public méthode

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
Résultat string

TryParse() public static méthode

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.
Résultat bool