Secure Mime ContextImport Async(X509Certificate 2, Cancellation Token) Method
Asynchronously import a certificate.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
An asynchronous task context.
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public virtual Task ImportAsync(
X509Certificate2 certificate,
CancellationToken cancellationToken = default
)Parameters
- certificate X509Certificate2
- The certificate.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskAn asynchronous task context.
Implements
ISecureMimeContextImportAsync(X509Certificate2, CancellationToken)Remarks
Asynchronously imports a certificate.
Exceptions
| ArgumentNullException | certificate is . |
| OperationCanceledException | The operation was cancelled via the cancellation token. |