C# Класс ASPC.Marvel.CrimeAPI.SharePointContextProvider

Provides SharePointContext instances.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
SharePointContextProvider ( ) : System

Initializes the default SharePointContextProvider instance.

Описание методов

CheckRedirectionStatus() публичный статический Метод

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.
Результат RedirectionStatus

CheckRedirectionStatus() публичный статический Метод

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.
Результат RedirectionStatus

CreateSharePointContext() публичный Метод

Creates a SharePointContext instance with the specified HTTP request.
public CreateSharePointContext ( HttpRequest httpRequest ) : SharePointContext
httpRequest HttpRequest The HTTP request.
Результат SharePointContext

CreateSharePointContext() публичный Метод

Creates a SharePointContext instance with the specified HTTP request.
public CreateSharePointContext ( System.Web.HttpRequestBase httpRequest ) : SharePointContext
httpRequest System.Web.HttpRequestBase The HTTP request.
Результат SharePointContext

CreateSharePointContext() защищенный абстрактный Метод

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.
Результат SharePointContext

GetSharePointContext() публичный Метод

Gets a SharePointContext instance associated with the specified HTTP context.
public GetSharePointContext ( HttpContext httpContext ) : SharePointContext
httpContext System.Web.HttpContext The HTTP context.
Результат SharePointContext

GetSharePointContext() публичный Метод

Gets a SharePointContext instance associated with the specified HTTP context.
public GetSharePointContext ( System.Web.HttpContextBase httpContext ) : SharePointContext
httpContext System.Web.HttpContextBase The HTTP context.
Результат SharePointContext

LoadSharePointContext() защищенный абстрактный Метод

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.
Результат SharePointContext

Register() публичный статический Метод

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.
Результат void

SaveSharePointContext() защищенный абстрактный Метод

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.
Результат void

ValidateSharePointContext() защищенный абстрактный Метод

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.
Результат bool