AudienceManager.IsCurrentUserInAudienceOf AudienceManager.IsCurrentUserInAudienceOf AudienceManager.IsCurrentUserInAudienceOf Method

Definition

Overloads

IsCurrentUserInAudienceOf(String, Boolean) IsCurrentUserInAudienceOf(String, Boolean) IsCurrentUserInAudienceOf(String, Boolean)

This method will check whether current user's Audience membership belong to any audience as defined within audienceTextRepresentation. If does, return true, else return false. If there is any exception occured, this function will return false and log the exception, raise ShipAssert()

IsCurrentUserInAudienceOf(AudienceLoader, String, Boolean) IsCurrentUserInAudienceOf(AudienceLoader, String, Boolean)

This method will check whether current user's Audience membership belong to any audience as defined within audienceTextRepresentation. If does, return true, else return false. If there is any exception occured, this function will return false and log the exception, raise ShipAssert()

IsCurrentUserInAudienceOf(String, Boolean) IsCurrentUserInAudienceOf(String, Boolean) IsCurrentUserInAudienceOf(String, Boolean)

This method will check whether current user's Audience membership belong to any audience as defined within audienceTextRepresentation. If does, return true, else return false. If there is any exception occured, this function will return false and log the exception, raise ShipAssert()

public:
 static bool IsCurrentUserInAudienceOf(System::String ^ audienceTextRepresentation, bool showUntargetedAudience);
public static bool IsCurrentUserInAudienceOf (string audienceTextRepresentation, bool showUntargetedAudience);
Public Shared Function IsCurrentUserInAudienceOf (audienceTextRepresentation As String, showUntargetedAudience As Boolean) As Boolean
Parameters
audienceTextRepresentation
String String String

..

showUntargetedAudience
Boolean Boolean Boolean

..

Returns

true or false to mean whether current user is in audience or not

IsCurrentUserInAudienceOf(AudienceLoader, String, Boolean) IsCurrentUserInAudienceOf(AudienceLoader, String, Boolean)

This method will check whether current user's Audience membership belong to any audience as defined within audienceTextRepresentation. If does, return true, else return false. If there is any exception occured, this function will return false and log the exception, raise ShipAssert()

public:
 static bool IsCurrentUserInAudienceOf(Microsoft::Office::Server::WebControls::AudienceLoader ^ audienceLoader, System::String ^ audienceTextRepresentation, bool showUntargetedAudience);
public static bool IsCurrentUserInAudienceOf (Microsoft.Office.Server.WebControls.AudienceLoader audienceLoader, string audienceTextRepresentation, bool showUntargetedAudience);
Parameters
audienceTextRepresentation
String String String

..

showUntargetedAudience
Boolean Boolean Boolean

..

Returns

true or false to mean whether current user is in audience or not

Applies to