MultipartEntity Class
Represents MIME entity with multiple body parts.
public sealed class MultipartEntity : Entity, IList<Entity>, ICollection<Entity>, IEnumerable<Entity>, IEnumerable
- Inheritance:
- System.
Object MultipartEntity
Implements
Constructors
MultipartEntity(String)
Initializes a new instance of the Multipart
Parameters
mediaSubtype
- System.
String
The media subtype.
MultipartEntity(String, IEnumerable<Entity>)
Initializes a new instance of the Multipart
Parameters
mediaSubtype
- System.
String
The media subtype.
items
- System.
Collections. <Entity>Generic. IEnumerable
The collection of child entities.
Exceptions
- System.
Argument Null Exception
Child collection is null.
- System.
Argument Exception
Child collection contains null elements.
Properties
Boundary
Gets or sets the boundary.
Property Value
- System.
String
The boundary.
Exceptions
- System.
Argument Exception
Boundary is null or empty.
Count
Gets the count.
Property Value
- System.
Int32
The count.
Epilogue
Gets or sets the entity epilogue.
Property Value
- System.
Byte []
The entity epilogue.
IsMultipart
Gets a value indicating whether this entity is multipart.
Property Value
- System.
Boolean
True
if this instance is multipart; otherwise, false
.
Overrides
Item[Int32]
Gets or sets the Entity at the specified index.
Parameters
index
- System.
Int32
The index.
Property Value
Exceptions
- System.
Argument Null Exception
value
Preamble
Gets or sets the entity preamble.
Property Value
- System.
Byte []
The entity preamble.
Methods
Add(Entity)
Adds the specified Entity item.
Parameters
Clear()
Removes all the items from this Multipart
Clone()
Creates a copy of this Multipart
Returns
The copy of this Multipart
Overrides
Contains(Entity)
Determines whether this Multipart
Parameters
Returns
- System.
Boolean
True
if Entity item is found; otherwise, false
.
CopyTo(Entity[], Int32)
Copies this Multipart
Parameters
array
- Entity[]
The one-dimensional Entity array that is the destination of the items copied from this Multipart
arrayIndex
- System.
Int32
The zero-based index in array at which copying begins.
Find(Func<Entity, Boolean>)
Checks if this Multipart
Parameters
predicate
- System.
Func <Entity, System.Boolean >
A function to test each element for a condition.
Returns
Multipart
Overrides
IndexOf(Entity)
Searches for the specified Entity item and returns the zero-based index of the first occurrence within this Multipart
Parameters
Returns
- System.
Int32
The zero-based index of the first occurrence of Entity item within this Multipart
Insert(Int32, Entity)
Inserts an Entity item at the specified index.
Parameters
index
- System.
Int32
The index.
Exceptions
- System.
Argument Null Exception
Entity item is null.
- System.
Argument Exception
Collection already contains Entity item.
Remove(Entity)
Removes the specified Entity item.
Parameters
Returns
- System.
Boolean
True
if item is successfully removed; otherwise, false
.
RemoveAt(Int32)
Removes the Entity item at the specified index.
Parameters
index
- System.
Int32
The zero-based index of the Entity item to remove.
Inherited Properties
Content | Gets the Content-Type header value. (Inherited from Entity) |
Headers | Gets the Entity headers. (Inherited from Entity) |
Parent | Gets the Entity parent. (Inherited from Entity) |
Inherited Methods
Find(Media | Checks if this Entity instance or one of its children matches the specified content type. (Inherited from Entity) |
Find(System. | Checks if this Entity instance or one of its children matches the specified top level media type. (Inherited from Entity) |