Share via


Audience.AudienceRules Property

Gets or sets an array of AudienceRuleComponent objects that represents rules that define this audience.

Namespace:  Microsoft.Office.Server.Audience
Assembly:  Microsoft.Office.Server.UserProfiles (in Microsoft.Office.Server.UserProfiles.dll)

Syntax

'Declaration
Public Property AudienceRules As ArrayList
    Get
    Set
'Usage
Dim instance As Audience
Dim value As ArrayList

value = instance.AudienceRules

instance.AudienceRules = value
public ArrayList AudienceRules { get; set; }

Property Value

Type: System.Collections.ArrayList
An ArrayList object that contains a list of rules that define this audience. Each item in the list contains the rule operand, operator, and value.

Remarks

If a user adds an audience rule by calling Audience.AudienceRules.Add directly, and then calls the Commit method of the Audience class, the new rule is not saved. The AudienceRules property must be set before calling the Commit method. To avoid this problem, create a new ArrayList of rules and set Audience.AudienceRules = newArrayListOfRules. Setting the AudienceRules property in this way sets an internal flag that indicates to the Commit method that the rule has changed since the last call to Commit. If you call Audience.AudienceRules.Add directly, this internal flag is never set and Commit does not save any changes.

See Also

Reference

Audience Class

Audience Members

Microsoft.Office.Server.Audience Namespace