Aspose::Email::Mapi::MapiRecipientCollection Class Reference

Represents a collection of MapiRecipient objects. More...

Inherits System::Collections::ObjectModel::Collection< System::SharedPtr< Aspose::Email::Mapi::MapiRecipient > >.

Public Member Functions

 MapiRecipientCollection ()
 Initializes a new instance of the MapiRecipientCollection class. More...
 
 MapiRecipientCollection (System::SharedPtr< MapiMessageItemBase > owner)
 Initializes a new instance of the MapiRecipientCollection class. More...
 
void Add (System::String address, System::String displayName, MapiRecipientType recipientType)
 Adds the new recipient. More...
 
void Add (System::String address, System::String addressType, System::String displayName, MapiRecipientType recipientType)
 Adds the new recipient. More...
 
void Add (System::String address, System::String addressType, System::String displayName, MapiRecipientType recipientType, bool updateDisplayNames)
 Adds the new recipient. More...
 
void Add (const System::SharedPtr< MapiRecipient > &item) override
 Adds an object to the end of the T:System::Collections::ObjectModel::Collection`1. More...
 
void Insert (int32_t index, const System::SharedPtr< MapiRecipient > &item) override
 Inserts an element into the T:System::Collections::ObjectModel::Collection`1 at the specified index. More...
 
bool ContainsAddress (System::String address, MapiRecipientType recType)
 
void DeepCopyTo (System::SharedPtr< MapiRecipientCollection > dest)
 
void SetTemplateWeakPtr (uint32_t argument) override
 

Protected Member Functions

virtual ~MapiRecipientCollection ()
 

Friends

class Aspose::Email::Mapi::MapiMessageItemBase
 
class Aspose::Email::Mapi::MapiMessage
 
class Aspose::Email::Mapi::MapiRecipientCollectionFactory
 

Detailed Description

Represents a collection of MapiRecipient objects.

Constructor & Destructor Documentation

◆ MapiRecipientCollection() [1/2]

Aspose::Email::Mapi::MapiRecipientCollection::MapiRecipientCollection ( )

Initializes a new instance of the MapiRecipientCollection class.

◆ MapiRecipientCollection() [2/2]

Aspose::Email::Mapi::MapiRecipientCollection::MapiRecipientCollection ( System::SharedPtr< MapiMessageItemBase owner)

Initializes a new instance of the MapiRecipientCollection class.

Parameters
ownerThe owner message.

◆ ~MapiRecipientCollection()

virtual Aspose::Email::Mapi::MapiRecipientCollection::~MapiRecipientCollection ( )
protectedvirtual

Member Function Documentation

◆ Add() [1/4]

void Aspose::Email::Mapi::MapiRecipientCollection::Add ( const System::SharedPtr< MapiRecipient > &  item)
override

Adds an object to the end of the T:System::Collections::ObjectModel::Collection`1.

Parameters
itemThe object to be added to the end of the T:System::Collections::ObjectModel::Collection`1. The value can be null for reference types.

◆ Add() [2/4]

void Aspose::Email::Mapi::MapiRecipientCollection::Add ( System::String  address,
System::String  addressType,
System::String  displayName,
MapiRecipientType  recipientType 
)

Adds the new recipient.

When adding a new recepient, the value of either MapiMessage.DisplayTo or MapiMessage.DisplayBcc or MapiMessage.DisplayCC is also updated depending on the type of recepient.

Parameters
addressThe mail address of recipient.
addressTypeThe type of address.
displayNameThe display name of recipient.
recipientTypeType of the recipient.
Exceptions
ArgumentNullExceptionthrows if recipient address is null or empty.
ArgumentExceptionthrows if recipient address is not in a recognized format.

◆ Add() [3/4]

void Aspose::Email::Mapi::MapiRecipientCollection::Add ( System::String  address,
System::String  addressType,
System::String  displayName,
MapiRecipientType  recipientType,
bool  updateDisplayNames 
)

Adds the new recipient.

When adding a new recepient, the value of either MapiMessage.DisplayTo or MapiMessage.DisplayBcc or MapiMessage.DisplayCC is also updated depending on the type of recepient.

Parameters
addressThe mail address of recipient.
addressTypeThe type of address.
displayNameThe display name of recipient.
recipientTypeType of the recipient.
updateDisplayNamesThe DisplayNames will be updated if true.
Exceptions
ArgumentNullExceptionthrows if recipient address is null or empty.
ArgumentExceptionthrows if recipient address is not in a recognized format.

◆ Add() [4/4]

void Aspose::Email::Mapi::MapiRecipientCollection::Add ( System::String  address,
System::String  displayName,
MapiRecipientType  recipientType 
)

Adds the new recipient.

When adding a new recepient, the value of either MapiMessage.DisplayTo or MapiMessage.DisplayBcc or MapiMessage.DisplayCC is also updated depending on the type of recepient.

Parameters
addressThe mail address of recipient.
displayNameThe display name of recipient.
recipientTypeType of the recipient.
Exceptions
ArgumentNullExceptionthrows if recipient address is null or empty.
ArgumentExceptionthrows if recipient address is not in a recognized format.

◆ ContainsAddress()

bool Aspose::Email::Mapi::MapiRecipientCollection::ContainsAddress ( System::String  address,
MapiRecipientType  recType 
)

◆ DeepCopyTo()

void Aspose::Email::Mapi::MapiRecipientCollection::DeepCopyTo ( System::SharedPtr< MapiRecipientCollection dest)

◆ Insert()

void Aspose::Email::Mapi::MapiRecipientCollection::Insert ( int32_t  index,
const System::SharedPtr< MapiRecipient > &  item 
)
override

Inserts an element into the T:System::Collections::ObjectModel::Collection`1 at the specified index.

Parameters
indexThe zero-based index at which item should be inserted.
itemThe object to insert. The value can be null for reference types.
Exceptions
T:System::ArgumentOutOfRangeExceptionindex is less than zero.

-or-

index is greater than P:System::Collections::ObjectModel::Collection`1::Count.

◆ SetTemplateWeakPtr()

void Aspose::Email::Mapi::MapiRecipientCollection::SetTemplateWeakPtr ( uint32_t  argument)
override

Friends And Related Function Documentation

◆ Aspose::Email::Mapi::MapiMessage

friend class Aspose::Email::Mapi::MapiMessage
friend

◆ Aspose::Email::Mapi::MapiMessageItemBase

◆ Aspose::Email::Mapi::MapiRecipientCollectionFactory

friend class Aspose::Email::Mapi::MapiRecipientCollectionFactory
friend