C# Класс Papercut.Smtp.Mime.MimeReader

This class is responsible for parsing a string array of lines containing a MIME message.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CreateMimeEntity ( ) : MimeEntity

Creates the MIME entity.

GetContentType ( string contentType ) : ContentType

Gets the type of the content.

GetMediaMainType ( string mediaType ) : string

Gets the type of the media main.

GetMediaSubType ( string mediaType ) : string

Gets the type of the media sub.

GetMediaType ( string mediaType ) : string

Gets the type of the media.

GetTransferEncoding ( string transferEncoding ) : TransferEncoding

Gets the transfer encoding.

The transfer encoding determination follows the same rules as Peter Huber's article w/ the exception of not throwing exceptions when binary is provided as a transferEncoding. Instead it is left to the calling code to check for binary.

MimeReader ( IEnumerable lines ) : System

Initializes a new instance of the MimeReader class.

Приватные методы

Метод Описание
AddChildEntity ( MimeEntity entity, Queue lines ) : void

Adds the child entity.

GetBytes ( string content ) : byte[]

Gets a byte[] of content for the provided string.

MimeReader ( ) : System

Prevents a default instance of the MimeReader class from being created.

MimeReader ( MimeEntity entity, Queue lines ) : System

Initializes a new instance of the MimeReader class.

ParseBody ( ) : void

Parses the body.

ParseHeaders ( ) : int

Parse headers into _entity.Headers NameValueCollection.

ProcessHeaders ( ) : void

Processes mime specific headers.

SetDecodedContentStream ( ) : void

Sets the decoded content stream by decoding the EncodedMessage and writing it to the entity content stream.

Описание методов

CreateMimeEntity() публичный Метод

Creates the MIME entity.
public CreateMimeEntity ( ) : MimeEntity
Результат MimeEntity

GetContentType() публичный статический Метод

Gets the type of the content.
public static GetContentType ( string contentType ) : ContentType
contentType string /// Type of the content. ///
Результат System.Net.Mime.ContentType

GetMediaMainType() публичный статический Метод

Gets the type of the media main.
public static GetMediaMainType ( string mediaType ) : string
mediaType string /// Type of the media. ///
Результат string

GetMediaSubType() публичный статический Метод

Gets the type of the media sub.
public static GetMediaSubType ( string mediaType ) : string
mediaType string /// Type of the media. ///
Результат string

GetMediaType() публичный статический Метод

Gets the type of the media.
public static GetMediaType ( string mediaType ) : string
mediaType string /// Type of the media. ///
Результат string

GetTransferEncoding() публичный статический Метод

Gets the transfer encoding.
The transfer encoding determination follows the same rules as Peter Huber's article w/ the exception of not throwing exceptions when binary is provided as a transferEncoding. Instead it is left to the calling code to check for binary.
public static GetTransferEncoding ( string transferEncoding ) : TransferEncoding
transferEncoding string /// The transfer encoding. ///
Результат TransferEncoding

MimeReader() публичный Метод

Initializes a new instance of the MimeReader class.
public MimeReader ( IEnumerable lines ) : System
lines IEnumerable /// The lines. ///
Результат System