Click or drag to resize
MimeKit

ParserOptionsRegisterMimeType Method

Register a MimeEntity subclass for the specified mime-type.

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

Parameters

mimeType  String
The MIME type.
type  Type
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