CryptographyContextRegister(Type) Method

Registers a default SecureMimeContext or OpenPgpContext.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public static void Register(
	Type type
)

Parameters

type  Type
A custom subclass of SecureMimeContext or OpenPgpContext.

Remarks

Registers the specified type as the default SecureMimeContext or OpenPgpContext.

Exceptions

ArgumentNullException type is .
ArgumentException

type is not a subclass of SecureMimeContext or OpenPgpContext.

-or-

type does not have a parameterless constructor.

See Also