Click or drag to resize
MimeKit

MimeEntity Class

An abstract MIME entity.
Inheritance Hierarchy
SystemObject
  MimeKitMimeEntity
    MimeKitMessagePart
    MimeKitMimePart
    MimeKitMultipart

Namespace: MimeKit
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public abstract class MimeEntity : IDisposable

The MimeEntity type exposes the following members.

Constructors
 NameDescription
Protected methodMimeEntity(ContentType) Initialize a new instance of the MimeEntity class.
Protected methodMimeEntity(MimeEntityConstructorArgs) Initialize a new instance of the MimeEntity class based on the MimeEntityConstructorArgs.
Protected methodMimeEntity(String, String) Initialize a new instance of the MimeEntity class.
Top
Properties
 NameDescription
Public propertyContentBase Get or set the base content URI.
Public propertyContentDisposition Get or set the content disposition.
Public propertyContentId Get or set the Content-Id.
Public propertyContentLocation Get or set the content location.
Public propertyContentType Get the type of the content.
Public propertyHeaders Get the list of headers.
Public propertyIsAttachment Get a value indicating whether this MimePart is an attachment.
Top
Methods
 NameDescription
Public methodAccept Dispatches to the specific visit method for this MIME entity.
Public methodDispose Releases all resources used by the MimeEntity object.
Protected methodDispose(Boolean) Releases the unmanaged resources used by the MimeEntity and optionally releases the managed resources.
Public methodEquals
(Inherited from Object)
Protected methodFinalize Releases unmanaged resources and performs other cleanup operations before the MimeEntity is reclaimed by garbage collection.
(Overrides ObjectFinalize)
Public methodGetHashCode
(Inherited from Object)
Public methodGetType
(Inherited from Object)
Public methodStatic memberLoad(Stream, CancellationToken) Load a MimeEntity from the specified stream.
Public methodStatic memberLoad(String, CancellationToken) Load a MimeEntity from the specified file.
Public methodStatic memberCode exampleLoad(ContentType, Stream, CancellationToken) Load a MimeEntity from the specified content stream.
Public methodStatic memberLoad(ParserOptions, Stream, CancellationToken) Load a MimeEntity from the specified stream.
Public methodStatic memberLoad(ParserOptions, String, CancellationToken) Load a MimeEntity from the specified file.
Public methodStatic memberLoad(Stream, Boolean, CancellationToken) Load a MimeEntity from the specified stream.
Public methodStatic memberLoad(ParserOptions, ContentType, Stream, CancellationToken) Load a MimeEntity from the specified content stream.
Public methodStatic memberLoad(ParserOptions, Stream, Boolean, CancellationToken) Load a MimeEntity from the specified stream.
Public methodStatic memberLoadAsync(Stream, CancellationToken) Asynchronously load a MimeEntity from the specified stream.
Public methodStatic memberLoadAsync(String, CancellationToken) Asynchronously load a MimeEntity from the specified file.
Public methodStatic memberLoadAsync(ContentType, Stream, CancellationToken) Asynchronously load a MimeEntity from the specified content stream.
Public methodStatic memberLoadAsync(ParserOptions, Stream, CancellationToken) Asynchronously load a MimeEntity from the specified stream.
Public methodStatic memberLoadAsync(ParserOptions, String, CancellationToken) Asynchronously load a MimeEntity from the specified file.
Public methodStatic memberLoadAsync(Stream, Boolean, CancellationToken) Asynchronously load a MimeEntity from the specified stream.
Public methodStatic memberLoadAsync(ParserOptions, ContentType, Stream, CancellationToken) Asynchronously load a MimeEntity from the specified content stream.
Public methodStatic memberLoadAsync(ParserOptions, Stream, Boolean, CancellationToken) Asynchronously load a MimeEntity from the specified stream.
Protected methodMemberwiseClone
(Inherited from Object)
Protected methodOnHeadersChanged Called when the headers change in some way.
Public methodPrepare Prepare the MIME entity for transport using the specified encoding constraints.
Protected methodRemoveHeader Remove a header by name.
Protected methodSetHeader(String, Byte) Set the value of a header using the raw value.
Protected methodSetHeader(String, String) Set the value of a header.
Public methodToString Return a String that represents the MimeEntity for debugging purposes.
(Overrides ObjectToString)
Protected methodTryInit Tries to use the given object to initialize the appropriate property.
Public methodWriteTo(Stream, CancellationToken) Write the MimeEntity to the specified output stream.
Public methodWriteTo(String, CancellationToken) Write the MimeEntity to the specified file.
Public methodWriteTo(FormatOptions, Stream, CancellationToken) Write the MimeEntity to the specified output stream.
Public methodWriteTo(FormatOptions, String, CancellationToken) Write the MimeEntity to the specified file.
Public methodWriteTo(Stream, Boolean, CancellationToken) Write the MimeEntity to the specified output stream.
Public methodWriteTo(String, Boolean, CancellationToken) Write the MimeEntity to the specified file.
Public methodWriteTo(FormatOptions, Stream, Boolean, CancellationToken) Write the MimeEntity to the specified output stream.
Public methodWriteTo(FormatOptions, String, Boolean, CancellationToken) Write the MimeEntity to the specified file.
Public methodWriteToAsync(Stream, CancellationToken) Asynchronously write the MimeEntity to the specified output stream.
Public methodWriteToAsync(String, CancellationToken) Asynchronously write the MimeEntity to the specified file.
Public methodWriteToAsync(FormatOptions, Stream, CancellationToken) Asynchronously write the MimeEntity to the specified output stream.
Public methodWriteToAsync(FormatOptions, String, CancellationToken) Asynchronously write the MimeEntity to the specified file.
Public methodWriteToAsync(Stream, Boolean, CancellationToken) Asynchronously write the MimeEntity to the specified output stream.
Public methodWriteToAsync(String, Boolean, CancellationToken) Asynchronously write the MimeEntity to the specified file.
Public methodWriteToAsync(FormatOptions, Stream, Boolean, CancellationToken) Asynchronously write the MimeEntity to the specified output stream.
Public methodWriteToAsync(FormatOptions, String, Boolean, CancellationToken) Asynchronously write the MimeEntity to the specified file.
Top
Remarks

A MIME entity is really just a node in a tree structure of MIME parts in a MIME message.

There are 3 basic types of entities: MimePart, Multipart, and MessagePart (which is actually just a special variation of MimePart who's content is another MIME message/document). All other types are derivatives of one of those.

See Also