CrossListQueryCache.GetSiteDataResults method (SPWeb, SPSiteDataQuery, Boolean)
Gets the results of the passed-in query parameter on the specified web or list.
Namespace: Microsoft.SharePoint.Publishing
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Function GetSiteDataResults ( _
web As SPWeb, _
query As SPSiteDataQuery, _
useSpQueryOnList As Boolean _
) As SiteDataResults
'Usage
Dim instance As CrossListQueryCache
Dim web As SPWeb
Dim query As SPSiteDataQuery
Dim useSpQueryOnList As Boolean
Dim returnValue As SiteDataResults
returnValue = instance.GetSiteDataResults(web, _
query, useSpQueryOnList)
public SiteDataResults GetSiteDataResults(
SPWeb web,
SPSiteDataQuery query,
bool useSpQueryOnList
)
Parameters
web
Type: Microsoft.SharePoint.SPWebThe SPWeb object to run the query in.
query
Type: Microsoft.SharePoint.SPSiteDataQueryThe query to run.
useSpQueryOnList
Type: System.BooleanWhether to run the query against a list.
Return value
Type: Microsoft.SharePoint.Publishing.SiteDataResults
A SiteDataResults object that contains the results of running the query.
Remarks
This version of GetSiteDataResults forgoes the object's member SPSiteDataQuery and uses the passed-in SPSiteDataQuery.
The query will be run against an SPList object if the useSpQueryOnList parameter is set to true. Otherwise, the query will be run against a web.