Represents a collection of MapiAttachment objects.
More...
Inherits System::Collections::Generic::ListExt< System::SharedPtr< Aspose::Email::Mapi::MapiAttachment > >.
Represents a collection of MapiAttachment objects.
◆ MapiAttachmentCollection() [1/2]
Aspose::Email::Mapi::MapiAttachmentCollection::MapiAttachmentCollection |
( |
| ) |
|
◆ MapiAttachmentCollection() [2/2]
Aspose::Email::Mapi::MapiAttachmentCollection::MapiAttachmentCollection |
( |
System::SharedPtr< MapiMessageItemBase > |
owner | ) |
|
◆ ~MapiAttachmentCollection()
virtual Aspose::Email::Mapi::MapiAttachmentCollection::~MapiAttachmentCollection |
( |
| ) |
|
|
protectedvirtual |
◆ Add() [1/3]
void Aspose::Email::Mapi::MapiAttachmentCollection::Add |
( |
const System::SharedPtr< MapiAttachment > & |
item | ) |
|
|
override |
◆ Add() [2/3]
void Aspose::Email::Mapi::MapiAttachmentCollection::Add |
( |
System::String |
name, |
|
|
System::ArrayPtr< uint8_t > |
data |
|
) |
| |
Adds the new attachment.
- Parameters
-
name | The name of attachment. |
data | The attachment data. |
- Exceptions
-
ArgumentNullException | throws if attachment name is null or empty. |
ArgumentNullException | throws if attachment data is null. |
◆ Add() [3/3]
void Aspose::Email::Mapi::MapiAttachmentCollection::Add |
( |
System::String |
name, |
|
|
System::SharedPtr< MapiMessage > |
msg |
|
) |
| |
Adds the new attachment as embedded message.
- Parameters
-
name | The name of attachment. |
msg | The MapiMessage that represents the attached message. |
- Exceptions
-
ArgumentNullException | throws if message is null. |
◆ ContainsFileName()
bool Aspose::Email::Mapi::MapiAttachmentCollection::ContainsFileName |
( |
System::String |
fileName | ) |
|
Determines whether an element with defined name is in the collection.
- Parameters
-
- Returns
- true if item is found in the collections otherwise, false.
◆ CreateMapiAttachment()
System::SharedPtr<MapiAttachment> Aspose::Email::Mapi::MapiAttachmentCollection::CreateMapiAttachment |
( |
System::String |
name, |
|
|
System::SharedPtr< MapiMessage > |
msg, |
|
|
int32_t |
attachNum |
|
) |
| |
◆ DeepCopyTo()
◆ GetNames()
System::String Aspose::Email::Mapi::MapiAttachmentCollection::GetNames |
( |
| ) |
|
Gets the attachment names separated with comma.
- Returns
◆ Insert() [1/2]
void Aspose::Email::Mapi::MapiAttachmentCollection::Insert |
( |
int32_t |
index, |
|
|
const System::SharedPtr< MapiAttachment > & |
item |
|
) |
| |
|
override |
◆ Insert() [2/2]
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.
- Parameters
-
index | The zero-based index at which should be inserted. |
name | The name of attachment. |
msg | The MapiMessage that represents the attached message. |
- Exceptions
-
ArgumentNullException | throws if message is null. |
◆ Remove()
bool Aspose::Email::Mapi::MapiAttachmentCollection::Remove |
( |
const System::SharedPtr< MapiAttachment > & |
item | ) |
|
|
override |
Removes the first occurrence of a specific object from the MapiAttachmentCollection.
- Parameters
-
- Returns
- true if item is successfully removed; otherwise, false.
◆ RemoveAt()
void Aspose::Email::Mapi::MapiAttachmentCollection::RemoveAt |
( |
int32_t |
index | ) |
|
|
override |
Removes the element at the specified index of the MapiAttachmentCollection.
- Parameters
-
index | he zero-based index of the element to remove. |
◆ Replace()
void Aspose::Email::Mapi::MapiAttachmentCollection::Replace |
( |
int32_t |
index, |
|
|
System::String |
name, |
|
|
System::SharedPtr< MapiMessage > |
msg |
|
) |
| |
Replaces an element at the specified index.
- Parameters
-
index | The zero-based index at which should be replaced. |
name | The name of attachment. |
msg | The MapiMessage that represents the attached message. |
- Exceptions
-
ArgumentNullException | throws if message is null. |
◆ SetTemplateWeakPtr()
void Aspose::Email::Mapi::MapiAttachmentCollection::SetTemplateWeakPtr |
( |
uint32_t |
argument | ) |
|
|
override |
◆ Aspose::Email::Mapi::MapiMessage
◆ Aspose::Email::Tnef::TnefAttachment
friend class Aspose::Email::Tnef::TnefAttachment |
|
friend |
◆ Aspose::Email::Tools::ForwardMessageBuilder