PortalApplication.GetContext, méthode (HttpContext) (Microsoft.SharePoint.Portal)
Gets a reference to a PortalContext object that represents the current application context from the specified HttpContext object.
Espace de noms : Microsoft.SharePoint.Portal
Assembly : Microsoft.SharePoint.Portal (dans microsoft.sharepoint.portal.dll)
Syntaxe
'Déclaration
Public Shared Function GetContext ( _
context As HttpContext _
) As PortalContext
'Utilisation
Dim context As HttpContext
Dim returnValue As PortalContext
returnValue = PortalApplication.GetContext(context)
public static PortalContext GetContext (
HttpContext context
)
Paramètres
- context
An HttpContext object that represents an application context.
Valeur de retour
A PortalContext object that represents the current application context.
Remarques
The GetContext method gets a cached PortalContext object from the specified HttpContext object.
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