Class GroupMemberCollection
- Namespace
- Microsoft.Exchange.WebServices.Data
- Assembly
- Microsoft.Exchange.WebServices.dll
Represents a collection of members of GroupMember type.
public sealed class GroupMemberCollection : ComplexPropertyCollection<GroupMember>, IEnumerable<GroupMember>, IEnumerable
- Inheritance
-
GroupMemberCollection
- Implements
- Inherited Members
Constructors
GroupMemberCollection()
Initializes a new instance of the GroupMemberCollection class.
public GroupMemberCollection()
Methods
Add(GroupMember)
Adds a member to the collection.
public void Add(GroupMember member)
Parameters
member
GroupMemberThe member to add.
AddContactEmailAddress(Contact, EmailAddressKey)
Adds a member that is linked to a specific e-mail address of a contact.
public void AddContactEmailAddress(Contact contact, EmailAddressKey emailAddressKey)
Parameters
contact
ContactThe contact to link to.
emailAddressKey
EmailAddressKeyThe contact's e-mail address to link to.
AddContactGroup(ItemId)
Adds a member linked to a Contact Group.
public void AddContactGroup(ItemId contactGroupId)
Parameters
contactGroupId
ItemIdThe Id of the contact group.
AddDirectoryContact(string)
Adds a member linked to an Active Directory contact.
public void AddDirectoryContact(string smtpAddress)
Parameters
smtpAddress
stringThe SMTP address of the Active Directory contact.
AddDirectoryContact(string, string)
Adds a member linked to an Active Directory contact.
public void AddDirectoryContact(string address, string routingType)
Parameters
address
stringThe address of the Active Directory contact.
routingType
stringThe routing type of the address.
AddDirectoryPublicFolder(string)
Adds a member linked to a mail-enabled Public Folder.
public void AddDirectoryPublicFolder(string smtpAddress)
Parameters
smtpAddress
stringThe SMTP address of the mail-enabled Public Folder.
AddDirectoryUser(string)
Adds a member linked to an Active Directory user.
public void AddDirectoryUser(string smtpAddress)
Parameters
smtpAddress
stringThe SMTP address of the member.
AddDirectoryUser(string, string)
Adds a member linked to an Active Directory user.
public void AddDirectoryUser(string address, string routingType)
Parameters
AddOneOff(string, string)
Adds a one-off member.
public void AddOneOff(string displayName, string smtpAddress)
Parameters
displayName
stringThe display name of the member.
smtpAddress
stringThe SMTP address of the member.
AddOneOff(string, string, string)
Adds a one-off member.
public void AddOneOff(string displayName, string address, string routingType)
Parameters
displayName
stringThe display name of the member.
address
stringThe address of the member.
routingType
stringThe routing type of the address.
AddPersonalContact(ItemId)
Adds a member linked to a contact's first available e-mail address.
public void AddPersonalContact(ItemId contactId)
Parameters
contactId
ItemIdThe Id of the contact.
AddPersonalContact(ItemId, string)
Adds a member linked to a specific contact's e-mail address.
public void AddPersonalContact(ItemId contactId, string addressToLink)
Parameters
AddPublicGroup(string)
Adds a member linked to a Public Group.
public void AddPublicGroup(string smtpAddress)
Parameters
smtpAddress
stringThe SMTP address of the Public Group.
AddRange(IEnumerable<GroupMember>)
Adds multiple members to the collection.
public void AddRange(IEnumerable<GroupMember> members)
Parameters
members
IEnumerable<GroupMember>The members to add.
Clear()
Clears the collection.
public void Clear()
Find(string)
Finds the member with the specified key in the collection. Members that have not yet been saved do not have a key.
public GroupMember Find(string key)
Parameters
key
stringThe key of the member to find.
Returns
- GroupMember
The member with the specified key.
Remove(GroupMember)
Removes a member from the collection.
public bool Remove(GroupMember member)
Parameters
member
GroupMemberThe member to remove.
Returns
- bool
True if the group member was successfully removed from the collection, false otherwise.
RemoveAt(int)
Removes a member at the specified index.
public void RemoveAt(int index)
Parameters
index
intThe index of the member to remove.