MailKit.MailSpool.GetMessageAsync C# (CSharp) Метод

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
		public virtual Task<MimeMessage> GetMessageAsync (int index, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null)
		{
			return Task.Factory.StartNew (() => {
				lock (SyncRoot) {
					return GetMessage (index, cancellationToken, progress);
				}
			}, cancellationToken, TaskCreationOptions.None, TaskScheduler.Default);
		}

Same methods

MailSpool::GetMessageAsync ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : Task