C# Class MimeKit.TextPart

A Textual MIME part.

Unless overridden, all textual parts parsed by the MimeParser, such as text/plain or text/html, will be represented by a TextPart.

For more information about text media types, see section 4.1 of http://www.ietf.org/rfc/rfc2046.txt

Inheritance: MimePart
Afficher le fichier Open project: nachocove/MimeKit Class Usage Examples

Private Properties

Свойство Type Description
IsFormat bool
TextPart System

Méthodes publiques

Méthode Description
Accept ( MimeKit.MimeVisitor visitor ) : void

Dispatches to the specific visit method for this MIME entity.

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

GetText ( Portable.Text.Encoding encoding ) : string

Gets the decoded text content using the provided charset encoding to override the charset specified in the Content-Type parameters.

Uses the provided charset encoding to convert the raw text content into a unicode string, overriding any charset specified in the Content-Type header.

GetText ( string charset ) : string

Gets the decoded text content using the provided charset to override the charset specified in the Content-Type parameters.

Uses the provided charset encoding to convert the raw text content into a unicode string, overriding any charset specified in the Content-Type header.

SetText ( Portable.Text.Encoding encoding, string text ) : void

Sets the text content and the charset parameter in the Content-Type header.

This method is similar to setting the TextPart.Text property, but allows specifying a charset encoding to use. Also updates the ContentType.Charset property.

SetText ( string charset, string text ) : void

Sets the text content and the charset parameter in the Content-Type header.

This method is similar to setting the TextPart.Text property, but allows specifying a charset encoding to use. Also updates the ContentType.Charset property.

TextPart ( ) : System

Initializes a new instance of the MimeKit.TextPart class with a Content-Type of text/plain.

Creates a default TextPart with a mime-type of text/plain.

TextPart ( MimeKit.MimeEntityConstructorArgs args ) : System

Initializes a new instance of the MimeKit.TextPart class.

This constructor is used by MimeKit.MimeParser.

TextPart ( string subtype ) : System

Initializes a new instance of the MimeKit.TextPart class with the specified text subtype.

Creates a new TextPart with the specified subtype.

Private Methods

Méthode Description
IsFormat ( TextFormat format ) : bool

Determines whether or not the text is in the specified format.

Determines whether or not the text is in the specified format.

TextPart ( MimeKit.ContentType contentType ) : System

Method Details

Accept() public méthode

Dispatches to the specific visit method for this MIME entity.
This default implementation for MimeKit.TextPart nodes calls MimeKit.MimeVisitor.VisitTextPart. Override this method to call into a more specific method on a derived visitor class of the MimeKit.MimeVisitor class. However, it should still support unknown visitors by calling MimeKit.MimeVisitor.VisitTextPart.
/// is null. ///
public Accept ( MimeKit.MimeVisitor visitor ) : void
visitor MimeKit.MimeVisitor The visitor.
Résultat void

GetText() public méthode

Gets the decoded text content using the provided charset encoding to override the charset specified in the Content-Type parameters.
Uses the provided charset encoding to convert the raw text content into a unicode string, overriding any charset specified in the Content-Type header.
/// is null. ///
public GetText ( Portable.Text.Encoding encoding ) : string
encoding Portable.Text.Encoding The charset encoding to use.
Résultat string

GetText() public méthode

Gets the decoded text content using the provided charset to override the charset specified in the Content-Type parameters.
Uses the provided charset encoding to convert the raw text content into a unicode string, overriding any charset specified in the Content-Type header.
/// is null. /// /// The is not supported. ///
public GetText ( string charset ) : string
charset string The charset encoding to use.
Résultat string

SetText() public méthode

Sets the text content and the charset parameter in the Content-Type header.
This method is similar to setting the TextPart.Text property, but allows specifying a charset encoding to use. Also updates the ContentType.Charset property.
/// is null. /// -or- /// is null. ///
public SetText ( Portable.Text.Encoding encoding, string text ) : void
encoding Portable.Text.Encoding The charset encoding.
text string The text content.
Résultat void

SetText() public méthode

Sets the text content and the charset parameter in the Content-Type header.
This method is similar to setting the TextPart.Text property, but allows specifying a charset encoding to use. Also updates the ContentType.Charset property.
/// is null. /// -or- /// is null. /// /// The is not supported. ///
public SetText ( string charset, string text ) : void
charset string The charset encoding.
text string The text content.
Résultat void

TextPart() public méthode

Initializes a new instance of the MimeKit.TextPart class with a Content-Type of text/plain.
Creates a default TextPart with a mime-type of text/plain.
public TextPart ( ) : System
Résultat System

TextPart() public méthode

Initializes a new instance of the MimeKit.TextPart class.
This constructor is used by MimeKit.MimeParser.
/// is null. ///
public TextPart ( MimeKit.MimeEntityConstructorArgs args ) : System
args MimeKit.MimeEntityConstructorArgs Information used by the constructor.
Résultat System

TextPart() public méthode

Initializes a new instance of the MimeKit.TextPart class with the specified text subtype.
Creates a new TextPart with the specified subtype.
/// is null. /// -or- /// is null. /// /// contains more than one . /// -or- /// contains more than one . /// -or- /// contains one or more arguments of an unknown type. ///
public TextPart ( string subtype ) : System
subtype string The media subtype.
Résultat System