C# Класс MailKit.Net.Imap.ImapUtils

IMAP utility functions.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CanonicalizeMailboxName ( string mailboxName, char directorySeparator ) : string

Canonicalize the name of the mailbox.

Canonicalizes the name of the mailbox by replacing various capitalizations of "INBOX" with the literal "INBOX" string.

FormatFlagsList ( MessageFlags flags, int numUserFlags ) : string

Formats a flags list suitable for use with the APPEND command.

FormatIndexSet ( IList indexes ) : string

Formats the array of indexes as a string suitable for use with IMAP commands.

FormatInternalDate ( DateTimeOffset date ) : string

Formats a date in a format suitable for use with the APPEND command.

FormatUidSet ( IList uids ) : string

Formats the array of UIDs as a string suitable for use with IMAP commands.

IsInbox ( string mailboxName ) : bool

Determines whether the specified mailbox is the Inbox.

ParseBody ( MailKit.Net.Imap.ImapEngine engine, string format, string path, CancellationToken cancellationToken ) : BodyPart
ParseEnvelope ( MailKit.Net.Imap.ImapEngine engine, CancellationToken cancellationToken ) : Envelope

Parses the ENVELOPE parenthesized list.

ParseFlagsList ( ImapEngine engine, string name, HashSet userFlags, CancellationToken cancellationToken ) : MessageFlags

Parses the flags list.

ParseFolderList ( ImapEngine engine, ImapCommand ic, int index ) : void

Parses an untagged LIST or LSUB response.

ParseImplementation ( ImapEngine engine, ImapCommand ic, int index ) : void

Parses an untagged ID response.

ParseInternalDate ( string text ) : DateTimeOffset

Parses the internal date string.

ParseLabelsList ( ImapEngine engine, CancellationToken cancellationToken ) : ReadOnlyCollection

Parses the X-GM-LABELS list.

ParseMetadata ( ImapEngine engine, ImapCommand ic, int index ) : void

Parses an untagged METADATA response.

ParseThreads ( ImapEngine engine, uint uidValidity, CancellationToken cancellationToken ) : IList

Parses the threads.

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

Метод Описание
InvalidInternalDateFormat ( string text ) : Exception
NeedsQuoting ( string value ) : bool
ParseContentDisposition ( MailKit.Net.Imap.ImapEngine engine, string format, CancellationToken cancellationToken ) : MimeKit.ContentDisposition
ParseContentLanguage ( MailKit.Net.Imap.ImapEngine engine, string format, CancellationToken cancellationToken ) : string[]
ParseContentLocation ( MailKit.Net.Imap.ImapEngine engine, string format, CancellationToken cancellationToken ) : Uri
ParseContentType ( MailKit.Net.Imap.ImapEngine engine, string format, CancellationToken cancellationToken, MimeKit.ContentType &contentType, string &value ) : bool
ParseEnvelopeAddress ( ImapEngine engine, string format, CancellationToken cancellationToken ) : EnvelopeAddress
ParseEnvelopeAddressList ( InternetAddressList list, ImapEngine engine, string format, CancellationToken cancellationToken ) : void
ParseEnvelopeDate ( ImapEngine engine, string format, CancellationToken cancellationToken ) : DateTimeOffset?
ParseMultipart ( ImapEngine engine, string format, string path, string subtype, CancellationToken cancellationToken ) : BodyPart
ParseParameterList ( StringBuilder builder, ImapEngine engine, string format, CancellationToken cancellationToken ) : void
ParseThread ( ImapEngine engine, uint uidValidity, CancellationToken cancellationToken ) : MessageThread
ReadNStringToken ( ImapEngine engine, string format, bool rfc2047, CancellationToken cancellationToken ) : string
ReadNumber ( ImapEngine engine, string format, CancellationToken cancellationToken ) : uint
ReadStringToken ( ImapEngine engine, string format, CancellationToken cancellationToken ) : string
SkipBodyExtensions ( ImapEngine engine, string format, CancellationToken cancellationToken ) : void
TryGetInt32 ( string text, int &index, char delim, int &value ) : bool
TryGetInt32 ( string text, int &index, int &value ) : bool
TryGetMonth ( string text, int &index, char delim, int &month ) : bool
TryGetTimeZone ( string text, int &index, TimeSpan &timezone ) : bool

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

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

Canonicalize the name of the mailbox.
Canonicalizes the name of the mailbox by replacing various capitalizations of "INBOX" with the literal "INBOX" string.
public static CanonicalizeMailboxName ( string mailboxName, char directorySeparator ) : string
mailboxName string The encoded mailbox name.
directorySeparator char The directory separator.
Результат string

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

Formats a flags list suitable for use with the APPEND command.
public static FormatFlagsList ( MessageFlags flags, int numUserFlags ) : string
flags MessageFlags The message flags.
numUserFlags int The number of user-defined flags.
Результат string

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

Formats the array of indexes as a string suitable for use with IMAP commands.
/// is null. /// /// One or more of the indexes has a negative value. ///
public static FormatIndexSet ( IList indexes ) : string
indexes IList The indexes.
Результат string

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

Formats a date in a format suitable for use with the APPEND command.
public static FormatInternalDate ( DateTimeOffset date ) : string
date DateTimeOffset The date.
Результат string

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

Formats the array of UIDs as a string suitable for use with IMAP commands.
/// is null. /// /// One or more of the UIDs is invalid. ///
public static FormatUidSet ( IList uids ) : string
uids IList The UIDs.
Результат string

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

Determines whether the specified mailbox is the Inbox.
public static IsInbox ( string mailboxName ) : bool
mailboxName string The mailbox name.
Результат bool

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

public static ParseBody ( MailKit.Net.Imap.ImapEngine engine, string format, string path, CancellationToken cancellationToken ) : BodyPart
engine MailKit.Net.Imap.ImapEngine
format string
path string
cancellationToken System.Threading.CancellationToken
Результат BodyPart

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

Parses the ENVELOPE parenthesized list.
public static ParseEnvelope ( MailKit.Net.Imap.ImapEngine engine, CancellationToken cancellationToken ) : Envelope
engine MailKit.Net.Imap.ImapEngine The IMAP engine.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Envelope

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

Parses the flags list.
public static ParseFlagsList ( ImapEngine engine, string name, HashSet userFlags, CancellationToken cancellationToken ) : MessageFlags
engine ImapEngine The IMAP engine.
name string The name of the flags being parsed.
userFlags HashSet A hash set of user-defined message flags that will be populated if non-null.
cancellationToken CancellationToken The cancellation token.
Результат MessageFlags

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

Parses an untagged LIST or LSUB response.
public static ParseFolderList ( ImapEngine engine, ImapCommand ic, int index ) : void
engine ImapEngine The IMAP engine.
ic ImapCommand The IMAP command.
index int The index.
Результат void

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

Parses an untagged ID response.
public static ParseImplementation ( ImapEngine engine, ImapCommand ic, int index ) : void
engine ImapEngine The IMAP engine.
ic ImapCommand The IMAP command.
index int The index.
Результат void

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

Parses the internal date string.
public static ParseInternalDate ( string text ) : DateTimeOffset
text string The text to parse.
Результат DateTimeOffset

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

Parses the X-GM-LABELS list.
public static ParseLabelsList ( ImapEngine engine, CancellationToken cancellationToken ) : ReadOnlyCollection
engine ImapEngine The IMAP engine.
cancellationToken CancellationToken The cancellation token.
Результат ReadOnlyCollection

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

Parses an untagged METADATA response.
public static ParseMetadata ( ImapEngine engine, ImapCommand ic, int index ) : void
engine ImapEngine The IMAP engine.
ic ImapCommand The IMAP command.
index int The index.
Результат void

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

Parses the threads.
public static ParseThreads ( ImapEngine engine, uint uidValidity, CancellationToken cancellationToken ) : IList
engine ImapEngine The IMAP engine.
uidValidity uint The UIDVALIDITY of the folder.
cancellationToken CancellationToken The cancellation token.
Результат IList