SPServiceContext.GetContext method (SPServiceApplicationProxyGroup, SPSiteSubscriptionIdentifier)
Retrieves the service context that is associated with the specified SPServiceApplicationProxyGroup instance and SPSiteSubscriptionIdentifier.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function GetContext ( _
serviceApplicationProxyGroup As SPServiceApplicationProxyGroup, _
siteSubscriptionId As SPSiteSubscriptionIdentifier _
) As SPServiceContext
'Usage
Dim serviceApplicationProxyGroup As SPServiceApplicationProxyGroup
Dim siteSubscriptionId As SPSiteSubscriptionIdentifier
Dim returnValue As SPServiceContext
returnValue = SPServiceContext.GetContext(serviceApplicationProxyGroup, _
siteSubscriptionId)
public static SPServiceContext GetContext(
SPServiceApplicationProxyGroup serviceApplicationProxyGroup,
SPSiteSubscriptionIdentifier siteSubscriptionId
)
Parameters
serviceApplicationProxyGroup
Type: Microsoft.SharePoint.Administration.SPServiceApplicationProxyGroupAn instance of the SPServiceApplicationProxyGroup class.
siteSubscriptionId
Type: Microsoft.SharePoint.SPSiteSubscriptionIdentifierA SPSiteSubscriptionIdentifier object.
Return value
Type: Microsoft.SharePoint.SPServiceContext
The SPServiceContext object of the specified proxy group and site subscription identifier.