C# Class ASPC.Marvel.CrimeAPI.SharePointContext

Encapsulates all the information from SharePoint.
Afficher le fichier Open project: Inmeta/aspc2016 Class Usage Examples

Protected Properties

Свойство Type Description
AccessTokenLifetimeTolerance System.TimeSpan
appOnlyAccessTokenForSPAppWeb DateTime>.Tuple
appOnlyAccessTokenForSPHost DateTime>.Tuple
userAccessTokenForSPAppWeb DateTime>.Tuple
userAccessTokenForSPHost DateTime>.Tuple

Méthodes publiques

Méthode Description
CreateAppOnlyClientContextForSPAppWeb ( ) : ClientContext

Creates an app only ClientContext for the SharePoint app web.

CreateAppOnlyClientContextForSPHost ( ) : ClientContext

Creates app only ClientContext for the SharePoint host.

CreateUserClientContextForSPAppWeb ( ) : ClientContext

Creates a user ClientContext for the SharePoint app web.

CreateUserClientContextForSPHost ( ) : ClientContext

Creates a user ClientContext for the SharePoint host.

GetSPHostUrl ( HttpRequest httpRequest ) : Uri

Gets the SharePoint host url from QueryString of the specified HTTP request.

GetSPHostUrl ( System.Web.HttpRequestBase httpRequest ) : Uri

Gets the SharePoint host url from QueryString of the specified HTTP request.

Méthodes protégées

Méthode Description
IsAccessTokenValid ( DateTime>.Tuple accessToken ) : bool

Determines if the specified access token is valid. It considers an access token as not valid if it is null, or it has expired.

SharePointContext ( Uri spHostUrl, Uri spAppWebUrl, string spLanguage, string spClientTag, string spProductNumber ) : System

Constructor.

Private Methods

Méthode Description
CreateClientContext ( Uri spSiteUrl, string accessToken ) : ClientContext

Creates a ClientContext with the specified SharePoint site url and the access token.

GetDatabaseConnectionString ( ) : string

Method Details

CreateAppOnlyClientContextForSPAppWeb() public méthode

Creates an app only ClientContext for the SharePoint app web.
public CreateAppOnlyClientContextForSPAppWeb ( ) : ClientContext
Résultat ClientContext

CreateAppOnlyClientContextForSPHost() public méthode

Creates app only ClientContext for the SharePoint host.
public CreateAppOnlyClientContextForSPHost ( ) : ClientContext
Résultat ClientContext

CreateUserClientContextForSPAppWeb() public méthode

Creates a user ClientContext for the SharePoint app web.
public CreateUserClientContextForSPAppWeb ( ) : ClientContext
Résultat ClientContext

CreateUserClientContextForSPHost() public méthode

Creates a user ClientContext for the SharePoint host.
public CreateUserClientContextForSPHost ( ) : ClientContext
Résultat ClientContext

GetSPHostUrl() public static méthode

Gets the SharePoint host url from QueryString of the specified HTTP request.
public static GetSPHostUrl ( HttpRequest httpRequest ) : Uri
httpRequest HttpRequest The specified HTTP request.
Résultat System.Uri

GetSPHostUrl() public static méthode

Gets the SharePoint host url from QueryString of the specified HTTP request.
public static GetSPHostUrl ( System.Web.HttpRequestBase httpRequest ) : Uri
httpRequest System.Web.HttpRequestBase The specified HTTP request.
Résultat System.Uri

IsAccessTokenValid() protected static méthode

Determines if the specified access token is valid. It considers an access token as not valid if it is null, or it has expired.
protected static IsAccessTokenValid ( DateTime>.Tuple accessToken ) : bool
accessToken DateTime>.Tuple The access token to verify.
Résultat bool

SharePointContext() protected méthode

Constructor.
protected SharePointContext ( Uri spHostUrl, Uri spAppWebUrl, string spLanguage, string spClientTag, string spProductNumber ) : System
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.
Résultat System

Property Details

AccessTokenLifetimeTolerance protected_oe static_oe property

protected static TimeSpan,System AccessTokenLifetimeTolerance
Résultat System.TimeSpan

appOnlyAccessTokenForSPAppWeb protected_oe property

protected Tuple appOnlyAccessTokenForSPAppWeb
Résultat DateTime>.Tuple

appOnlyAccessTokenForSPHost protected_oe property

protected Tuple appOnlyAccessTokenForSPHost
Résultat DateTime>.Tuple

userAccessTokenForSPAppWeb protected_oe property

protected Tuple userAccessTokenForSPAppWeb
Résultat DateTime>.Tuple

userAccessTokenForSPHost protected_oe property

protected Tuple userAccessTokenForSPHost
Résultat DateTime>.Tuple