Class ContactInfoExtensions
- Namespace
- CMS.ContactManagement
- Assembly
- CMS.ContactManagement.dll
Provides extension methods for ContactInfo.
public static class ContactInfoExtensions
- Inheritance
-
objectContactInfoExtensions
Methods
IsInAllContactGroups(ContactInfo, params string[])
Indicates whether contact is present in all of the specified contact groups on contact's site.
public static bool IsInAllContactGroups(this ContactInfo contact, params string[] contactGroupNames)
Parameters
contactContactInfoContact whose presence in contact groups is checked.
contactGroupNamesstring[]Names of contact groups.
Returns
- bool
True if contact is present in all of the specified groups. Otherwise returns false.
Remarks
The method returns false when no contact group name is provided.
Exceptions
- ArgumentNullException
Thrown when
contactis null.
IsInAnyContactGroup(ContactInfo, params string[])
Indicates whether contact is present in any of the specified contact groups on contact's site.
public static bool IsInAnyContactGroup(this ContactInfo contact, params string[] contactGroupNames)
Parameters
contactContactInfoContact whose presence in contact groups is checked.
contactGroupNamesstring[]Names of contact groups.
Returns
- bool
True if contact is present in any of the specified groups. Otherwise returns false.
Remarks
The method returns false when no contact group name is provided.
Exceptions
- ArgumentNullException
Thrown when
contactis null.
IsInContactGroup(ContactInfo, string)
Indicates whether contact is present in contact group on contact's site.
public static bool IsInContactGroup(this ContactInfo contact, string contactGroupName)
Parameters
contactContactInfoContact whose presence in contact group is checked.
contactGroupNamestringName of contact group.
Returns
- bool
True if contact is present in the specified group. Otherwise returns false.
Exceptions
- ArgumentNullException
Thrown when
contactis null.- ArgumentException
Thrown when
contactGroupNameis null or empty string.