AudienceManager.CheckRuntimeRender Method
Checks whether the audience membership of the current user is contained in the audience list of any Web Parts in this Web site based on Windows SharePoint Services.
Namespace: Microsoft.Office.Server.Audience
Assembly: Microsoft.Office.Server (in Microsoft.Office.Server.dll)
Syntax
'Declaration
Public Function CheckRuntimeRender ( _
isIncludedFilter As String _
) As Boolean
'Usage
Dim instance As AudienceManager
Dim isIncludedFilter As String
Dim returnValue As Boolean
returnValue = instance.CheckRuntimeRender(isIncludedFilter)
public bool CheckRuntimeRender(
string isIncludedFilter
)
Parameters
- isIncludedFilter
Type: System.String
List of audience globally unique identifiers (GUIDs) in comma-delimited format. Each GUID must be contained in single quotation marks.
Return Value
Type: System.Boolean
A Boolean value. true if the audience list contained in the isIncludedFilter parameter is persisted by a Web Part in this SharePoint site; otherwise, false.
Remarks
The CheckRuntimeRender method implements the CheckRuntimeRender method from the IRuntimeFilter interface in the Microsoft.SharePoint.WebPartPages namespace. This method always returns a value of true if the AudienceManager object was initialized without a reference to a PortalContext object. This allows a Web Part with an associated audience GUID list to be imported into a site that is not based on Microsoft Office SharePoint Server 2007 without throwing exceptions.
Examples
The following code example shows how to construct the list of audience GUIDs and invoke the CheckRuntimeRender method.
String AudienceList;
AudienceManager AudMgr = new AudienceManager();
bool ret;
AudienceList = "'00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000001', '00000000-0000-0000-0000-000000000002'";
ret = AudMgr.CheckRuntimeRender(AudienceList);