AudienceManager.ValidateIsIncludedFilter method

Verifies the validity of the specified string of globally unique identifiers (GUID)s for an audience.

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

Syntax

'Declaration
Public Function ValidateIsIncludedFilter ( _
    PersistedString As String _
) As String
'Usage
Dim instance As AudienceManager
Dim PersistedString As String
Dim returnValue As String

returnValue = instance.ValidateIsIncludedFilter(PersistedString)
public string ValidateIsIncludedFilter(
    string PersistedString
)

Parameters

  • PersistedString
    Type: System.String

    String of comma-delimited GUIDs for an audience.

Return value

Type: System.String
String that is a substring of the PersistedString parameter that contains a comma-delimited list of valid GUIDs.

Implements

IRuntimeFilter.ValidateIsIncludedFilter(String)

Remarks

The ValidateIsIncludedFilter method implements the ValidateIsIncludedFilter method of the IRuntimeFilter interface of the Microsoft.SharePoint.WebPartPages namespace. This verifies data that is persisted by Web Parts before committing that data to the database. This method is used mainly when importing audience data. The validity of each GUID in the PersistedString parameter is checked. If the GUID is invalid or does not appear in the content database, it is discarded. The return string contains only valid audience GUIDs.

Examples

The following code example shows how to use the ValidateIsIncludedFilter method to verify a list of audience GUIDs.

string PersistedString;
string ValidatedString;
AudienceManager AudMgr = new AudienceManager();

PersistedString = "'00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000001'";
ValidatedString = AudMgr.ValidateIsIncludedFilter(PersistedString);
Dim PersistedString As String
Dim ValidatedString As String
Dim AudMgr As New AudienceManager()

PersistedString = "'00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000001'"
ValidatedString = AudMgr.ValidateIsIncludedFilter(PersistedString)

See also

Reference

AudienceManager class

AudienceManager members

Microsoft.Office.Server.Audience namespace