Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the cache data that is based on the CrossListQueryInfo specification.
Namespace: Microsoft.SharePoint.Publishing
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Function GetSiteData ( _
site As SPSite _
) As DataTable
'Usage
Dim instance As CrossListQueryCache
Dim site As SPSite
Dim returnValue As DataTable
returnValue = instance.GetSiteData(site)
public DataTable GetSiteData(
SPSite site
)
Parameters
site
Type: Microsoft.SharePoint.SPSiteThe SPSite object that is used to retrieve the data.
Return Value
Type: System.Data.DataTable
The cache data that is based on the CrossListQueryInfo specification.
Remarks
Can be used only to query a single site collection. Using this object to query multiple site collections is not supported. If this function is called from a web part, it can only be used to query data from the site collection where the web part is deployed.
Examples
// Execute QueryCbqQueryVersionInfo userCbqQuery = queryCache.UserQueryVersionInfo;CrossListQueryCache xlqCache = new CrossListQueryCache(userCbqQuery.VersionCrossListQueryInfo);DataTable data = xlqCache.GetSiteData(SPContext.Current.Site);
' Execute QueryDim userCbqQuery As CbqQueryVersionInfo = queryCache.UserQueryVersionInfoDim xlqCache As New CrossListQueryCache(userCbqQuery.VersionCrossListQueryInfo)Dim data As DataTable = xlqCache.GetSiteData(SPContext.Current.Site)