Table of Contents

Class ContactInfoExtensions

Namespace
CMS.ContactManagement
Assembly
CMS.ContactManagement.dll

Provides extension methods for ContactInfo.

public static class ContactInfoExtensions
Inheritance
object
ContactInfoExtensions

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

contact ContactInfo

Contact whose presence in contact groups is checked.

contactGroupNames string[]

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 contact is 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

contact ContactInfo

Contact whose presence in contact groups is checked.

contactGroupNames string[]

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 contact is 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

contact ContactInfo

Contact whose presence in contact group is checked.

contactGroupName string

Name of contact group.

Returns

bool

True if contact is present in the specified group. Otherwise returns false.

Exceptions

ArgumentNullException

Thrown when contact is null.

ArgumentException

Thrown when contactGroupName is null or empty string.