Click or drag to resize
MimeKit

GnuPGContextExportAsync(IEnumerableMailboxAddress, Stream, Boolean, CancellationToken) Method

Asynchronously export the public keyrings for the specified mailboxes.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public override Task ExportAsync(
	IEnumerable<MailboxAddress> mailboxes,
	Stream stream,
	bool armor,
	CancellationToken cancellationToken = default
)

Parameters

mailboxes  IEnumerableMailboxAddress
The mailboxes.
stream  Stream
The output stream.
armor  Boolean
true if the output should be armored; otherwise, false.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

Task
An asynchronous task context.
Exceptions
ExceptionCondition
ArgumentNullException

mailboxes is null.

-or-

stream is null.

ArgumentExceptionmailboxes was empty.
IOException An I/O error occurred.
NotSupportedException Exporting keys is not supported by this cryptography context.
OperationCanceledException The operation was canceled via the cancellation token.
Remarks
Asynchronously exports the public keyrings for the specified mailboxes.
See Also