Share via


CrossListQueryCache.GetSiteDataResults method (SPSite, Boolean)

Gets the results of the current query on the specified site. The query will be run against an SPList if use SpQueryOnList is set to true. Otherwise, the query will be run against a site or Web.

Namespace:  Microsoft.SharePoint.Publishing
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

Syntax

'Declaration
Public Function GetSiteDataResults ( _
    site As SPSite, _
    useSpQueryOnList As Boolean _
) As SiteDataResults
'Usage
Dim instance As CrossListQueryCache
Dim site As SPSite
Dim useSpQueryOnList As Boolean
Dim returnValue As SiteDataResults

returnValue = instance.GetSiteDataResults(site, _
    useSpQueryOnList)
public SiteDataResults GetSiteDataResults(
    SPSite site,
    bool useSpQueryOnList
)

Parameters

  • useSpQueryOnList
    Type: System.Boolean

    Whether 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 uses the web url in this object's CrossListQueryInfo to determine the Web to query against or the Web of the list being queried against depending on the value of useSpQueryOnList.

See also

Reference

CrossListQueryCache class

CrossListQueryCache members

GetSiteDataResults overload

Microsoft.SharePoint.Publishing namespace