public final class AttachmentCollection extends com.aspose.ms.System.Collections.ObjectModel.Collection<Attachment> implements com.aspose.ms.System.IDisposable
Represents a collection of e-mail message attachments.
Modifier and Type | Method and Description |
---|---|
protected void |
clearItems()
Removes all elements from the
System.Collections.ObjectModel.Collection`1 . |
void |
dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
void |
insertItem(int index,
Attachment item)
Inserts an element into the
System.Collections.ObjectModel.Collection`1 at the specified index. |
protected void |
removeItem(int index)
Removes the element at the specified index of the
System.Collections.ObjectModel.Collection`1 . |
protected void |
setItem(int index,
Attachment item)
Replaces the element at the specified index.
|
public final void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
dispose
in interface com.aspose.ms.System.IDisposable
protected void removeItem(int index)
Removes the element at the specified index of the System.Collections.ObjectModel.Collection`1
.
index
- The zero-based index of the element to remove.ArgumentOutOfRangeException
- index
is less than zero.
-or-
index
is equal to or greater than P:System.Collections.ObjectModel.Collection`1.Count
.protected void clearItems()
Removes all elements from the System.Collections.ObjectModel.Collection`1
.
protected void setItem(int index, Attachment item)
Replaces the element at the specified index.
setItem
in class com.aspose.ms.System.Collections.ObjectModel.Collection<Attachment>
index
- The zero-based index of the element to replace.item
- The new value for the element at the specified index. The value can be null for reference types.ArgumentOutOfRangeException
- index
is less than zero.
-or-
index
is greater than P:System.Collections.ObjectModel.Collection`1.Count
.public void insertItem(int index, Attachment item)
Inserts an element into the System.Collections.ObjectModel.Collection`1
at the specified index.
insertItem
in interface com.aspose.ms.System.Collections.Generic.IGenericList<Attachment>
insertItem
in class com.aspose.ms.System.Collections.ObjectModel.Collection<Attachment>
index
- The zero-based index at which item
should be inserted.item
- The object to insert. The value can be null for reference types.ArgumentOutOfRangeException
- index
is less than zero.
-or-
index
is greater than P:System.Collections.ObjectModel.Collection`1.Count
.