Represents a collection of MapiAttachment objects. More...
Inherits List< System::SharedPtr< Aspose::Email::Mapi::MapiAttachment > >.
Public Member Functions | |
ASPOSE_EMAIL_SHARED_API | MapiAttachmentCollection () |
Initializes a new instance of the MapiAttachmentCollection class. More... | |
ASPOSE_EMAIL_SHARED_API | MapiAttachmentCollection (System::SharedPtr< MapiMessageItemBase > owner) |
Initializes a new instance of the MapiAttachmentCollection class. More... | |
ASPOSE_EMAIL_SHARED_API void | Add (System::String name, System::SharedPtr< MapiMessage > msg) |
Adds the new attachment as embedded message. More... | |
ASPOSE_EMAIL_SHARED_API void | Add (System::String name, System::ArrayPtr< uint8_t > data) |
Adds the new attachment. More... | |
ASPOSE_EMAIL_SHARED_API void | Add (System::SharedPtr< MapiAttachment > const &item) |
Adds an object to the end of the T:System::Collections::ObjectModel::Collection`1. More... | |
ASPOSE_EMAIL_SHARED_API void | Insert (int32_t index, System::SharedPtr< MapiAttachment > const &item) |
Inserts an element into the T:System::Collections::ObjectModel::Collection`1 at the specified index. More... | |
ASPOSE_EMAIL_SHARED_API void | Insert (int32_t index, System::String name, System::SharedPtr< MapiMessage > msg) |
Inserts a message as attachment into the MapiAttachmentCollection at the specified index. More... | |
ASPOSE_EMAIL_SHARED_API void | Replace (int32_t index, System::String name, System::SharedPtr< MapiMessage > msg) |
Replaces an element at the specified index. More... | |
ASPOSE_EMAIL_SHARED_API void | RemoveAt (int32_t index) |
Removes the element at the specified index of the MapiAttachmentCollection. More... | |
ASPOSE_EMAIL_SHARED_API bool | Remove (System::SharedPtr< MapiAttachment > const &item) |
Removes the first occurrence of a specific object from the MapiAttachmentCollection. More... | |
ASPOSE_EMAIL_SHARED_API System::String | GetNames () |
Gets the attachment names separated with comma. More... | |
ASPOSE_EMAIL_SHARED_API bool | ContainsFileName (System::String fileName) |
Determines whether an element with defined name is in the collection. More... | |
ASPOSE_EMAIL_SHARED_API System::SharedPtr< MapiAttachment > | CreateMapiAttachment (System::String name, System::SharedPtr< MapiMessage > msg, int32_t attachNum) |
ASPOSE_EMAIL_SHARED_API void | DeepCopyTo (System::SharedPtr< MapiAttachmentCollection > dest) |
Protected Member Functions | |
virtual ASPOSE_EMAIL_SHARED_API | ~MapiAttachmentCollection () |
Friends | |
class | Aspose::Email::Tools::ForwardMessageBuilder |
class | Aspose::Email::Mapi::MapiMessage |
class | Aspose::Email::Tnef::TnefAttachment |
Represents a collection of MapiAttachment objects.
ASPOSE_EMAIL_SHARED_API Aspose::Email::Mapi::MapiAttachmentCollection::MapiAttachmentCollection | ( | ) |
Initializes a new instance of the MapiAttachmentCollection class.
ASPOSE_EMAIL_SHARED_API Aspose::Email::Mapi::MapiAttachmentCollection::MapiAttachmentCollection | ( | System::SharedPtr< MapiMessageItemBase > | owner | ) |
Initializes a new instance of the MapiAttachmentCollection class.
owner | The owner message. |
|
protectedvirtual |
ASPOSE_EMAIL_SHARED_API void Aspose::Email::Mapi::MapiAttachmentCollection::Add | ( | System::SharedPtr< MapiAttachment > const & | item | ) |
Adds an object to the end of the T:System::Collections::ObjectModel::Collection`1.
item | The object to be added to the end of the T:System::Collections::ObjectModel::Collection`1. The value can be null for reference types. |
ASPOSE_EMAIL_SHARED_API void Aspose::Email::Mapi::MapiAttachmentCollection::Add | ( | System::String | name, |
System::ArrayPtr< uint8_t > | data | ||
) |
Adds the new attachment.
name | The name of attachment. |
data | The attachment data. |
ArgumentNullException | throws if attachment name is null or empty. |
ArgumentNullException | throws if attachment data is null. |
ASPOSE_EMAIL_SHARED_API void Aspose::Email::Mapi::MapiAttachmentCollection::Add | ( | System::String | name, |
System::SharedPtr< MapiMessage > | msg | ||
) |
Adds the new attachment as embedded message.
name | The name of attachment. |
msg | The MapiMessage that represents the attached message. |
ArgumentNullException | throws if message is null. |
ASPOSE_EMAIL_SHARED_API bool Aspose::Email::Mapi::MapiAttachmentCollection::ContainsFileName | ( | System::String | fileName | ) |
Determines whether an element with defined name is in the collection.
fileName |
ASPOSE_EMAIL_SHARED_API System::SharedPtr<MapiAttachment> Aspose::Email::Mapi::MapiAttachmentCollection::CreateMapiAttachment | ( | System::String | name, |
System::SharedPtr< MapiMessage > | msg, | ||
int32_t | attachNum | ||
) |
ASPOSE_EMAIL_SHARED_API void Aspose::Email::Mapi::MapiAttachmentCollection::DeepCopyTo | ( | System::SharedPtr< MapiAttachmentCollection > | dest | ) |
ASPOSE_EMAIL_SHARED_API System::String Aspose::Email::Mapi::MapiAttachmentCollection::GetNames | ( | ) |
Gets the attachment names separated with comma.
ASPOSE_EMAIL_SHARED_API void Aspose::Email::Mapi::MapiAttachmentCollection::Insert | ( | int32_t | index, |
System::SharedPtr< MapiAttachment > const & | item | ||
) |
Inserts an element into the T:System::Collections::ObjectModel::Collection`1 at the specified index.
index | The zero-based index at which item should be inserted. |
item | The object to insert. The value can be null for reference types. |
T:System::ArgumentOutOfRangeException | index is less than zero. |
-or-
index is greater than P:System::Collections::ObjectModel::Collection`1::Count.
ASPOSE_EMAIL_SHARED_API void Aspose::Email::Mapi::MapiAttachmentCollection::Insert | ( | int32_t | index, |
System::String | name, | ||
System::SharedPtr< MapiMessage > | msg | ||
) |
Inserts a message as attachment into the MapiAttachmentCollection at the specified index.
index | The zero-based index at which should be inserted. |
name | The name of attachment. |
msg | The MapiMessage that represents the attached message. |
ArgumentNullException | throws if message is null. |
ASPOSE_EMAIL_SHARED_API bool Aspose::Email::Mapi::MapiAttachmentCollection::Remove | ( | System::SharedPtr< MapiAttachment > const & | item | ) |
Removes the first occurrence of a specific object from the MapiAttachmentCollection.
item | The object to remove from the MapiAttachmentCollection. |
ASPOSE_EMAIL_SHARED_API void Aspose::Email::Mapi::MapiAttachmentCollection::RemoveAt | ( | int32_t | index | ) |
Removes the element at the specified index of the MapiAttachmentCollection.
index | he zero-based index of the element to remove. |
ASPOSE_EMAIL_SHARED_API void Aspose::Email::Mapi::MapiAttachmentCollection::Replace | ( | int32_t | index, |
System::String | name, | ||
System::SharedPtr< MapiMessage > | msg | ||
) |
Replaces an element at the specified index.
index | The zero-based index at which should be replaced. |
name | The name of attachment. |
msg | The MapiMessage that represents the attached message. |
ArgumentNullException | throws if message is null. |
|
friend |
|
friend |
|
friend |