C# Класс MailKit.MailSpool

An abstract mail spool implementation.
An abstract mail spool implementation.
Наследование: MailService, IMailSpool
Показать файл Открыть проект

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

Метод Описание
DeleteAllMessages ( CancellationToken cancellationToken = default(CancellationToken) ) : void

Mark all messages for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).

DeleteAllMessagesAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously mark all messages for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).

DeleteMessage ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : void

Mark the specified message for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).

DeleteMessageAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously mark the specified message for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).

DeleteMessages ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : void

Mark the specified messages for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).

DeleteMessages ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : void

Mark the specified range of messages for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).

DeleteMessagesAsync ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously mark the specified messages for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).

DeleteMessagesAsync ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously mark the specified range of messages for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).

GetEnumerator ( ) : IEnumerator

Gets an enumerator for the messages in the folder.

Gets an enumerator for the messages in the folder.

GetMessage ( int index, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : MimeMessage

Get the message at the specified index.

Gets the message at the specified index.

GetMessageAsync ( int index, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task

Asynchronously get the message at the specified index.

Asynchronously gets the message at the specified index.

GetMessageHeaders ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : HeaderList

Get the headers for the specified message.

Gets the headers for the specified message.

GetMessageHeaders ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : IList

Get the headers for the specified messages.

Gets the headers for the specified messages.

GetMessageHeaders ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : IList

Get the headers of the messages within the specified range.

Gets the headers of the messages within the specified range.

GetMessageHeadersAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously get the headers for the specified message.

Asynchronously gets the headers for the specified message.

GetMessageHeadersAsync ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Asynchronously get the headers for the specified messages.

Asynchronously gets the headers for the specified messages.

GetMessageHeadersAsync ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Get the headers of the messages within the specified range.

Gets the headers of the messages within the specified range.

GetMessageSize ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : int

Get the size of the specified message, in bytes.

Gets the size of the specified message, in bytes.

GetMessageSizeAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously get the size of the specified message, in bytes.

Asynchronously gets the size of the specified message, in bytes.

GetMessageSizes ( CancellationToken cancellationToken = default(CancellationToken) ) : IList

Get the sizes for all available messages, in bytes.

Gets the sizes for all available messages, in bytes.

GetMessageSizesAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Asynchronously get the sizes for all available messages, in bytes.

Asynchronously gets the sizes for all available messages, in bytes.

GetMessageUid ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : string

Get the UID of the message at the specified index.

Not all servers support UIDs, so you should first check the SupportsUids property.

GetMessageUidAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously get the UID of the message at the specified index.

Not all servers support UIDs, so you should first check the SupportsUids property.

GetMessageUids ( CancellationToken cancellationToken = default(CancellationToken) ) : IList

Get the full list of available message UIDs.

Not all servers support UIDs, so you should first check the SupportsUids property.

GetMessageUidsAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Get the full list of available message UIDs.

Not all servers support UIDs, so you should first check the SupportsUids property.

GetMessages ( IList indexes, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList

Get the messages at the specified indexes.

Get the messages at the specified indexes.

GetMessages ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList

Get the messages within the specified range.

Gets the messages within the specified range.

GetMessagesAsync ( IList indexes, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>

Asynchronously get the messages at the specified indexes.

Asynchronously get the messages at the specified indexes.

GetMessagesAsync ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>

Asynchronously get the messages within the specified range.

Asynchronously gets the messages within the specified range.

GetStream ( int index, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : System.Stream

Get the message or header stream at the specified index.

Gets the message or header stream at the specified index.

GetStreamAsync ( int index, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task

Asynchronously get the message or header stream at the specified index.

Asynchronously gets the message or header stream at the specified index.

GetStreams ( IList indexes, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList

Get the message or header streams at the specified indexes.

Get the message or header streams at the specified indexes.

If the mail server supports pipelining, this method will likely be more efficient than using GetStream(int,bool,CancellationToken,ITransferProgress) for each message because it will batch the commands to reduce latency.

GetStreams ( int startIndex, int count, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList

Get the message or header streams within the specified range.

Gets the message or header streams within the specified range.

If the mail server supports pipelining, this method will likely be more efficient than using GetStream(int,bool,CancellationToken,ITransferProgress) for each message because it will batch the commands to reduce latency.

GetStreamsAsync ( IList indexes, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>

Asynchronously get the message or header streams at the specified indexes.

Asynchronously get the message or header streams at the specified indexes.

GetStreamsAsync ( int startIndex, int count, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>

Asynchronously get the message or header streams within the specified range.

Asynchronously gets the message or header streams within the specified range.

Reset ( CancellationToken cancellationToken = default(CancellationToken) ) : void

Reset the state of all messages marked for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).

ResetAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously reset the state of all messages marked for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).

Защищенные методы

Метод Описание
MailSpool ( IProtocolLogger protocolLogger ) : System

Initializes a new instance of the MailKit.MailSpool class.

Initializes a new instance of the MailKit.MailSpool class.

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

Метод Описание
DeleteMessage ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : void
DeleteMessageAsync ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : Task
DeleteMessages ( IList uids, CancellationToken cancellationToken = default(CancellationToken) ) : void
DeleteMessagesAsync ( IList uids, CancellationToken cancellationToken = default(CancellationToken) ) : Task
GetMessage ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : MimeMessage
GetMessageAsync ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : Task
GetMessageCount ( CancellationToken cancellationToken = default(CancellationToken) ) : int
GetMessageCountAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task
GetMessageHeaders ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : HeaderList
GetMessageHeaders ( IList uids, CancellationToken cancellationToken = default(CancellationToken) ) : IList
GetMessageHeadersAsync ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : Task
GetMessageHeadersAsync ( IList uids, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
GetMessageSize ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : int
GetMessageSizeAsync ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : Task
GetMessages ( IList uids, CancellationToken cancellationToken = default(CancellationToken) ) : IList
GetMessagesAsync ( IList uids, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
IEnumerable ( ) : IEnumerator

Gets an enumerator for the messages in the folder.

Gets an enumerator for the messages in the folder.

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

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

Mark all messages for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract DeleteAllMessages ( CancellationToken cancellationToken = default(CancellationToken) ) : void
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат void

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

Asynchronously mark all messages for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public DeleteAllMessagesAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task

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

Mark the specified message for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract DeleteMessage ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : void
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат void

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

Asynchronously mark the specified message for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public DeleteMessageAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task

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

Mark the specified messages for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).
/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract DeleteMessages ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : void
indexes IList The indexes of the messages.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат void

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

Mark the specified range of messages for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).
/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract DeleteMessages ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : void
startIndex int The index of the first message to mark for deletion.
count int The number of messages to mark for deletion.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат void

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

Asynchronously mark the specified messages for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).
/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public DeleteMessagesAsync ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : Task
indexes IList The indexes of the messages.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task

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

Asynchronously mark the specified range of messages for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).
/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public DeleteMessagesAsync ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : Task
startIndex int The index of the first message to mark for deletion.
count int The number of messages to mark for deletion.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task

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

Gets an enumerator for the messages in the folder.
Gets an enumerator for the messages in the folder.
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// A POP3 command failed. /// /// A protocol error occurred. ///
public abstract GetEnumerator ( ) : IEnumerator
Результат IEnumerator

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

Get the message at the specified index.
Gets the message at the specified index.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessage ( int index, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : MimeMessage
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Результат MimeKit.MimeMessage

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

Asynchronously get the message at the specified index.
Asynchronously gets the message at the specified index.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageAsync ( int index, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Результат Task

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

Get the headers for the specified message.
Gets the headers for the specified message.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessageHeaders ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : HeaderList
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат HeaderList

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

Get the headers for the specified messages.
Gets the headers for the specified messages.
/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessageHeaders ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : IList
indexes IList The indexes of the messages.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат IList

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

Get the headers of the messages within the specified range.
Gets the headers of the messages within the specified range.
/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessageHeaders ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : IList
startIndex int The index of the first message to get.
count int The number of messages to get.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат IList

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

Asynchronously get the headers for the specified message.
Asynchronously gets the headers for the specified message.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageHeadersAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task

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

Asynchronously get the headers for the specified messages.
Asynchronously gets the headers for the specified messages.
/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageHeadersAsync ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
indexes IList The indexes of the messages.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task>

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

Get the headers of the messages within the specified range.
Gets the headers of the messages within the specified range.
/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageHeadersAsync ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
startIndex int The index of the first message to get.
count int The number of messages to get.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task>

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

Get the size of the specified message, in bytes.
Gets the size of the specified message, in bytes.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessageSize ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : int
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат int

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

Asynchronously get the size of the specified message, in bytes.
Asynchronously gets the size of the specified message, in bytes.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageSizeAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task

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

Get the sizes for all available messages, in bytes.
Gets the sizes for all available messages, in bytes.
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessageSizes ( CancellationToken cancellationToken = default(CancellationToken) ) : IList
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат IList

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

Asynchronously get the sizes for all available messages, in bytes.
Asynchronously gets the sizes for all available messages, in bytes.
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageSizesAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task>
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task>

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

Get the UID of the message at the specified index.
Not all servers support UIDs, so you should first check the SupportsUids property.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The mail spool does not support UIDs. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessageUid ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : string
index int The message index.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат string

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

Asynchronously get the UID of the message at the specified index.
Not all servers support UIDs, so you should first check the SupportsUids property.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The mail spool does not support UIDs. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageUidAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task
index int The message index.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task

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

Get the full list of available message UIDs.
Not all servers support UIDs, so you should first check the SupportsUids property.
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The mail spool does not support UIDs. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessageUids ( CancellationToken cancellationToken = default(CancellationToken) ) : IList
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат IList

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

Get the full list of available message UIDs.
Not all servers support UIDs, so you should first check the SupportsUids property.
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The mail spool does not support UIDs. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageUidsAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task>
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task>

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

Get the messages at the specified indexes.
Get the messages at the specified indexes.
/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessages ( IList indexes, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList
indexes IList The indexes of the messages.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Результат IList

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

Get the messages within the specified range.
Gets the messages within the specified range.
/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessages ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList
startIndex int The index of the first message to get.
count int The number of messages to get.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Результат IList

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

Asynchronously get the messages at the specified indexes.
Asynchronously get the messages at the specified indexes.
/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessagesAsync ( IList indexes, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>
indexes IList The indexes of the messages.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Результат Task>

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

Asynchronously get the messages within the specified range.
Asynchronously gets the messages within the specified range.
/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessagesAsync ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>
startIndex int The index of the first message to get.
count int The number of messages to get.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Результат Task>

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

Get the message or header stream at the specified index.
Gets the message or header stream at the specified index.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetStream ( int index, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : System.Stream
index int The index of the message.
headersOnly bool true if only the headers should be retrieved; otherwise, false.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Результат System.Stream

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

Asynchronously get the message or header stream at the specified index.
Asynchronously gets the message or header stream at the specified index.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetStreamAsync ( int index, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task
index int The index of the message.
headersOnly bool true if only the headers should be retrieved; otherwise, false.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Результат Task

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

Get the message or header streams at the specified indexes.

Get the message or header streams at the specified indexes.

If the mail server supports pipelining, this method will likely be more efficient than using GetStream(int,bool,CancellationToken,ITransferProgress) for each message because it will batch the commands to reduce latency.

/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetStreams ( IList indexes, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList
indexes IList The indexes of the messages.
headersOnly bool true if only the headers should be retrieved; otherwise, false.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Результат IList

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

Get the message or header streams within the specified range.

Gets the message or header streams within the specified range.

If the mail server supports pipelining, this method will likely be more efficient than using GetStream(int,bool,CancellationToken,ITransferProgress) for each message because it will batch the commands to reduce latency.

/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetStreams ( int startIndex, int count, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList
startIndex int The index of the first stream to get.
count int The number of streams to get.
headersOnly bool true if only the headers should be retrieved; otherwise, false.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Результат IList

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

Asynchronously get the message or header streams at the specified indexes.
Asynchronously get the message or header streams at the specified indexes.
/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetStreamsAsync ( IList indexes, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>
indexes IList The indexes of the messages.
headersOnly bool true if only the headers should be retrieved; otherwise, false.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Результат Task>

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

Asynchronously get the message or header streams within the specified range.
Asynchronously gets the message or header streams within the specified range.
/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetStreamsAsync ( int startIndex, int count, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>
startIndex int The index of the first stream to get.
count int The number of streams to get.
headersOnly bool true if only the headers should be retrieved; otherwise, false.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Результат Task>

MailSpool() защищенный Метод

Initializes a new instance of the MailKit.MailSpool class.
Initializes a new instance of the MailKit.MailSpool class.
/// is null. ///
protected MailSpool ( IProtocolLogger protocolLogger ) : System
protocolLogger IProtocolLogger The protocol logger.
Результат System

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

Reset the state of all messages marked for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract Reset ( CancellationToken cancellationToken = default(CancellationToken) ) : void
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат void

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

Asynchronously reset the state of all messages marked for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public ResetAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task