Multipart Class |
public class Multipart : MimeEntity, IMultipart, IMimeEntity, IDisposable, ICollection<MimeEntity>, IEnumerable<MimeEntity>, IEnumerable, IList<MimeEntity>
The Multipart type exposes the following members.
Name | Description | |
---|---|---|
Multipart | Initialize a new instance of the Multipart class. | |
Multipart(MimeEntityConstructorArgs) | Initialize a new instance of the Multipart class. | |
Multipart(String) | Initialize a new instance of the Multipart class. | |
Multipart(String, Object) | Initialize a new instance of the Multipart class. |
Name | Description | |
---|---|---|
Boundary | Get or set the boundary. | |
ContentBase |
Get or set the base content URI.
(Inherited from MimeEntity) | |
ContentDisposition |
Get or set the content disposition.
(Inherited from MimeEntity) | |
ContentId |
Get or set the Content-Id.
(Inherited from MimeEntity) | |
ContentLocation |
Get or set the content location.
(Inherited from MimeEntity) | |
ContentType |
Get the type of the content.
(Inherited from MimeEntity) | |
Count | Get the number of parts in the multipart. | |
Epilogue | Get or set the epilogue. | |
Headers |
Get the list of headers.
(Inherited from MimeEntity) | |
IsAttachment |
Get a value indicating whether this MimePart is an attachment.
(Inherited from MimeEntity) | |
IsReadOnly | Get a value indicating whether this instance is read only. | |
Item | Get or set the MimeEntity at the specified index. | |
Preamble | Get or set the preamble. |
Name | Description | |
---|---|---|
Accept |
Dispatches to the specific visit method for this MIME entity.
(Overrides MimeEntityAccept(MimeVisitor)) | |
Add | Add an entity to the multipart. | |
Clear | Clear a multipart. | |
Clear(Boolean) | Clear a multipart. | |
Contains | Check if the Multipart contains the specified entity. | |
CopyTo | Copy all of the entities in the Multipart to the specified array. | |
Dispose |
Releases all resources used by the MimeEntity object.
(Inherited from MimeEntity) | |
Dispose(Boolean) |
Release the unmanaged resources used by the Multipart and
optionally releases the managed resources.
(Overrides MimeEntityDispose(Boolean)) | |
Equals | (Inherited from Object) | |
Finalize |
Releases unmanaged resources and performs other cleanup operations before the
MimeEntity is reclaimed by garbage collection.
(Inherited from MimeEntity) | |
GetEnumerator | Get the enumerator for the children of the Multipart. | |
GetHashCode | (Inherited from Object) | |
GetType | (Inherited from Object) | |
IndexOf | Get the index of an entity. | |
Insert | Insert an entity into the Multipart at the specified index. | |
MemberwiseClone | (Inherited from Object) | |
OnHeadersChanged |
Called when the headers change in some way.
(Inherited from MimeEntity) | |
Prepare |
Prepare the MIME entity for transport using the specified encoding constraints.
(Overrides MimeEntityPrepare(EncodingConstraint, Int32)) | |
Remove | Remove an entity from the multipart. | |
RemoveAt | Remove an entity from the Multipart at the specified index. | |
RemoveHeader |
Remove a header by name.
(Inherited from MimeEntity) | |
SetHeader(String, Byte) |
Set the value of a header using the raw value.
(Inherited from MimeEntity) | |
SetHeader(String, String) |
Set the value of a header.
(Inherited from MimeEntity) | |
ToString |
Return a String that represents the MimeEntity for debugging purposes.
(Inherited from MimeEntity) | |
TryGetValue | Get the preferred message body if it exists. | |
TryInit |
Tries to use the given object to initialize the appropriate property.
(Inherited from MimeEntity) | |
WriteTo(Stream, CancellationToken) |
Write the MimeEntity to the specified output stream.
(Inherited from MimeEntity) | |
WriteTo(String, CancellationToken) |
Write the MimeEntity to the specified file.
(Inherited from MimeEntity) | |
WriteTo(FormatOptions, Stream, CancellationToken) |
Write the MimeEntity to the specified output stream.
(Inherited from MimeEntity) | |
WriteTo(FormatOptions, String, CancellationToken) |
Write the MimeEntity to the specified file.
(Inherited from MimeEntity) | |
WriteTo(Stream, Boolean, CancellationToken) |
Write the MimeEntity to the specified output stream.
(Inherited from MimeEntity) | |
WriteTo(String, Boolean, CancellationToken) |
Write the MimeEntity to the specified file.
(Inherited from MimeEntity) | |
WriteTo(FormatOptions, String, Boolean, CancellationToken) |
Write the MimeEntity to the specified file.
(Inherited from MimeEntity) | |
WriteTo(FormatOptions, Stream, Boolean, CancellationToken) |
Write the Multipart to the specified output stream.
(Overrides MimeEntityWriteTo(FormatOptions, Stream, Boolean, CancellationToken)) | |
WriteToAsync(Stream, CancellationToken) |
Asynchronously write the MimeEntity to the specified output stream.
(Inherited from MimeEntity) | |
WriteToAsync(String, CancellationToken) |
Asynchronously write the MimeEntity to the specified file.
(Inherited from MimeEntity) | |
WriteToAsync(FormatOptions, Stream, CancellationToken) |
Asynchronously write the MimeEntity to the specified output stream.
(Inherited from MimeEntity) | |
WriteToAsync(FormatOptions, String, CancellationToken) |
Asynchronously write the MimeEntity to the specified file.
(Inherited from MimeEntity) | |
WriteToAsync(Stream, Boolean, CancellationToken) |
Asynchronously write the MimeEntity to the specified output stream.
(Inherited from MimeEntity) | |
WriteToAsync(String, Boolean, CancellationToken) |
Asynchronously write the MimeEntity to the specified file.
(Inherited from MimeEntity) | |
WriteToAsync(FormatOptions, String, Boolean, CancellationToken) |
Asynchronously write the MimeEntity to the specified file.
(Inherited from MimeEntity) | |
WriteToAsync(FormatOptions, Stream, Boolean, CancellationToken) |
Asynchronously write the Multipart to the specified output stream.
(Overrides MimeEntityWriteToAsync(FormatOptions, Stream, Boolean, CancellationToken)) |
All multipart MIME entities will have a Content-Type with a media type of "multipart". The most common multipart MIME entity used in email is the "multipart/mixed" entity.
Four (4) initial subtypes were defined in the original MIME specifications: mixed, alternative, digest, and parallel.
The "multipart/mixed" type is a sort of general-purpose container. When used in email, the first entity is typically the "body" of the message while additional entities are most often file attachments.
Speaking of message "bodies", the "multipart/alternative" type is used to offer a list of alternative formats for the main body of the message (usually they will be "text/plain" and "text/html"). These alternatives are in order of increasing faithfulness to the original document (in other words, the last entity will be in a format that, when rendered, will most closely match what the sending client's WYSISYG editor produced).
The "multipart/digest" type will typically contain a digest of MIME messages and is most commonly used by mailing-list software.
The "multipart/parallel" type contains entities that are all meant to be shown (or heard) in parallel.
Another commonly used type is the "multipart/related" type which contains, as one might expect, inter-related MIME parts which typically reference each other via URIs based on the Content-Id and/or Content-Location headers.