AudienceManager.IsCurrentUserInAudienceOf Method (AudienceLoader, String, Boolean)
Returns whether the current user is in the specified audience.
Namespace: Microsoft.Office.Server.Audience
Assembly: Microsoft.Office.Server (in Microsoft.Office.Server.dll)
Syntax
'Declaration
Public Shared Function IsCurrentUserInAudienceOf ( _
audienceLoader As AudienceLoader, _
audienceTextRepresentation As String, _
showUntargetedAudience As Boolean _
) As Boolean
'Usage
Dim audienceLoader As AudienceLoader
Dim audienceTextRepresentation As String
Dim showUntargetedAudience As Boolean
Dim returnValue As Boolean
returnValue = AudienceManager.IsCurrentUserInAudienceOf(audienceLoader, _
audienceTextRepresentation, showUntargetedAudience)
public static bool IsCurrentUserInAudienceOf(
AudienceLoader audienceLoader,
string audienceTextRepresentation,
bool showUntargetedAudience
)
Parameters
- audienceLoader
Type: Microsoft.Office.Server.WebControls.AudienceLoader
An AudienceLoader object representing the current user's audience information.
- audienceTextRepresentation
Type: System.String
A string that identifies an audience.
- showUntargetedAudience
Type: System.Boolean
true if the current user is in the specified audience; otherwise, false.
Return Value
Type: System.Boolean
true if the current user is in the specified audience; otherwise, false.