C# Class ASPC.Marvel.CrimeAPI.SharePointContextProvider

Provides SharePointContext instances.
Afficher le fichier Open project: Inmeta/aspc2016 Class Usage Examples

Méthodes publiques

Méthode Description
CheckRedirectionStatus ( HttpContext httpContext, Uri &redirectUrl ) : RedirectionStatus

Checks if it is necessary to redirect to SharePoint for user to authenticate.

CheckRedirectionStatus ( System.Web.HttpContextBase httpContext, Uri &redirectUrl ) : RedirectionStatus

Checks if it is necessary to redirect to SharePoint for user to authenticate.

CreateSharePointContext ( HttpRequest httpRequest ) : SharePointContext

Creates a SharePointContext instance with the specified HTTP request.

CreateSharePointContext ( System.Web.HttpRequestBase httpRequest ) : SharePointContext

Creates a SharePointContext instance with the specified HTTP request.

GetSharePointContext ( HttpContext httpContext ) : SharePointContext

Gets a SharePointContext instance associated with the specified HTTP context.

GetSharePointContext ( System.Web.HttpContextBase httpContext ) : SharePointContext

Gets a SharePointContext instance associated with the specified HTTP context.

Register ( SharePointContextProvider provider ) : void

Registers the specified SharePointContextProvider instance as current. It should be called by Application_Start() in Global.asax.

Méthodes protégées

Méthode Description
CreateSharePointContext ( Uri spHostUrl, Uri spAppWebUrl, string spLanguage, string spClientTag, string spProductNumber, System.Web.HttpRequestBase httpRequest ) : SharePointContext

Creates a SharePointContext instance.

LoadSharePointContext ( System.Web.HttpContextBase httpContext ) : SharePointContext

Loads the SharePointContext instance associated with the specified HTTP context.

SaveSharePointContext ( SharePointContext spContext, System.Web.HttpContextBase httpContext ) : void

Saves the specified SharePointContext instance associated with the specified HTTP context. null is accepted for clearing the SharePointContext instance associated with the HTTP context.

ValidateSharePointContext ( SharePointContext spContext, System.Web.HttpContextBase httpContext ) : bool

Validates if the given SharePointContext can be used with the specified HTTP context.

Private Methods

Méthode Description
SharePointContextProvider ( ) : System

Initializes the default SharePointContextProvider instance.

Method Details

CheckRedirectionStatus() public static méthode

Checks if it is necessary to redirect to SharePoint for user to authenticate.
public static CheckRedirectionStatus ( HttpContext httpContext, Uri &redirectUrl ) : RedirectionStatus
httpContext System.Web.HttpContext The HTTP context.
redirectUrl System.Uri The redirect url to SharePoint if the status is ShouldRedirect. Null if the status is Ok or CanNotRedirect.
Résultat RedirectionStatus

CheckRedirectionStatus() public static méthode

Checks if it is necessary to redirect to SharePoint for user to authenticate.
public static CheckRedirectionStatus ( System.Web.HttpContextBase httpContext, Uri &redirectUrl ) : RedirectionStatus
httpContext System.Web.HttpContextBase The HTTP context.
redirectUrl System.Uri The redirect url to SharePoint if the status is ShouldRedirect. Null if the status is Ok or CanNotRedirect.
Résultat RedirectionStatus

CreateSharePointContext() public méthode

Creates a SharePointContext instance with the specified HTTP request.
public CreateSharePointContext ( HttpRequest httpRequest ) : SharePointContext
httpRequest HttpRequest The HTTP request.
Résultat SharePointContext

CreateSharePointContext() public méthode

Creates a SharePointContext instance with the specified HTTP request.
public CreateSharePointContext ( System.Web.HttpRequestBase httpRequest ) : SharePointContext
httpRequest System.Web.HttpRequestBase The HTTP request.
Résultat SharePointContext

CreateSharePointContext() protected abstract méthode

Creates a SharePointContext instance.
protected abstract CreateSharePointContext ( Uri spHostUrl, Uri spAppWebUrl, string spLanguage, string spClientTag, string spProductNumber, System.Web.HttpRequestBase httpRequest ) : SharePointContext
spHostUrl System.Uri The SharePoint host url.
spAppWebUrl System.Uri The SharePoint app web url.
spLanguage string The SharePoint language.
spClientTag string The SharePoint client tag.
spProductNumber string The SharePoint product number.
httpRequest System.Web.HttpRequestBase The HTTP request.
Résultat SharePointContext

GetSharePointContext() public méthode

Gets a SharePointContext instance associated with the specified HTTP context.
public GetSharePointContext ( HttpContext httpContext ) : SharePointContext
httpContext System.Web.HttpContext The HTTP context.
Résultat SharePointContext

GetSharePointContext() public méthode

Gets a SharePointContext instance associated with the specified HTTP context.
public GetSharePointContext ( System.Web.HttpContextBase httpContext ) : SharePointContext
httpContext System.Web.HttpContextBase The HTTP context.
Résultat SharePointContext

LoadSharePointContext() protected abstract méthode

Loads the SharePointContext instance associated with the specified HTTP context.
protected abstract LoadSharePointContext ( System.Web.HttpContextBase httpContext ) : SharePointContext
httpContext System.Web.HttpContextBase The HTTP context.
Résultat SharePointContext

Register() public static méthode

Registers the specified SharePointContextProvider instance as current. It should be called by Application_Start() in Global.asax.
public static Register ( SharePointContextProvider provider ) : void
provider SharePointContextProvider The SharePointContextProvider to be set as current.
Résultat void

SaveSharePointContext() protected abstract méthode

Saves the specified SharePointContext instance associated with the specified HTTP context. null is accepted for clearing the SharePointContext instance associated with the HTTP context.
protected abstract SaveSharePointContext ( SharePointContext spContext, System.Web.HttpContextBase httpContext ) : void
spContext SharePointContext The SharePointContext instance to be saved, or null.
httpContext System.Web.HttpContextBase The HTTP context.
Résultat void

ValidateSharePointContext() protected abstract méthode

Validates if the given SharePointContext can be used with the specified HTTP context.
protected abstract ValidateSharePointContext ( SharePointContext spContext, System.Web.HttpContextBase httpContext ) : bool
spContext SharePointContext The SharePointContext.
httpContext System.Web.HttpContextBase The HTTP context.
Résultat bool