Click or drag to resize
MimeKit

ParserOptionsRegisterMimeType Method

Registers the MimeEntity subclass for the specified mime-type.

Namespace:  MimeKit
Assembly:  MimeKit (in MimeKit.dll) Version: 3.0.0
Syntax
C#
public void RegisterMimeType(
	string mimeType,
	Type type
)

Parameters

mimeType
Type: SystemString
The MIME type.
type
Type: SystemType
A custom subclass of MimeEntity.
Exceptions
ExceptionCondition
ArgumentNullException

mimeType is null.

-or-

type is null.

ArgumentException

type is not a subclass of Multipart, MimePart, or MessagePart.

-or-

type does not have a constructor that takes only a MimeEntityConstructorArgs argument.

Remarks
Your custom MimeEntity class should not subclass MimeEntity directly, but rather it should subclass Multipart, MimePart, MessagePart, or one of their derivatives.
See Also