PortalApplication.GetContext, méthode (PortalSite) (Microsoft.SharePoint.Portal)
Gets a reference to a PortalContext object that represents the current application context for the specified portal site.
Espace de noms : Microsoft.SharePoint.Portal
Assembly : Microsoft.SharePoint.Portal (dans microsoft.sharepoint.portal.dll)
Syntaxe
'Déclaration
Public Shared Function GetContext ( _
site As PortalSite _
) As PortalContext
'Utilisation
Dim site As PortalSite
Dim returnValue As PortalContext
returnValue = PortalApplication.GetContext(site)
public static PortalContext GetContext (
PortalSite site
)
Paramètres
- site
A PortalSite object that represents a portal site.
Valeur de retour
A PortalContext object that represents the current application context.
Remarques
The following table describes the exception types.
Exception Type |
Condition |
---|---|
InvalidOperationException |
The System.Web.HttpContext.Current static property is null. |
Voir aussi
Référence
PortalApplication, classe
Membres PortalApplication
Microsoft.SharePoint.Portal, espace de noms