C# Class Microsoft.SharePoint.Client.ClientContextExtensions

Datei anzeigen Open project: OfficeDev/PnP-Sites-Core

Public Methods

Method Description
Clone ( this clientContext, Uri siteUrl ) : ClientContext

Clones a ClientContext object while "taking over" the security context of the existing ClientContext instance

Clone ( this clientContext, string siteUrl ) : ClientContext

Clones a ClientContext object while "taking over" the security context of the existing ClientContext instance

ExecuteQueryRetry ( this clientContext, int retryCount = 10, int delay = 500 ) : void

GetSiteCollectionContext ( this clientContext ) : ClientContext

Gets a site collection context for the passed web. This site collection client context uses the same credentials as the passed client context

HasMinimalServerLibraryVersion ( this clientContext, System.Version minimallyRequiredVersion ) : bool
HasMinimalServerLibraryVersion ( this clientContext, string minimallyRequiredVersion ) : bool

Checks the server library version of the context for a minimally required version

IsAppOnly ( this clientContext ) : bool

Checks if the used ClientContext is app-only

Private Methods

Method Description
ExecuteQueryImplementation ( ClientRuntimeContext clientContext, int retryCount = 10, int delay = 500 ) : void
GetCallingPnPMethod ( ) : string

Method Details

Clone() public static method

Clones a ClientContext object while "taking over" the security context of the existing ClientContext instance
public static Clone ( this clientContext, Uri siteUrl ) : ClientContext
clientContext this ClientContext to be cloned
siteUrl System.Uri Site url to be used for cloned ClientContext
return ClientContext

Clone() public static method

Clones a ClientContext object while "taking over" the security context of the existing ClientContext instance
public static Clone ( this clientContext, string siteUrl ) : ClientContext
clientContext this ClientContext to be cloned
siteUrl string Site url to be used for cloned ClientContext
return ClientContext

ExecuteQueryRetry() public static method

public static ExecuteQueryRetry ( this clientContext, int retryCount = 10, int delay = 500 ) : void
clientContext this
retryCount int Number of times to retry the request
delay int Milliseconds to wait before retrying the request. The delay will be increased (doubled) every retry
return void

GetSiteCollectionContext() public static method

Gets a site collection context for the passed web. This site collection client context uses the same credentials as the passed client context
public static GetSiteCollectionContext ( this clientContext ) : ClientContext
clientContext this Client context to take the credentials from
return ClientContext

HasMinimalServerLibraryVersion() public static method

public static HasMinimalServerLibraryVersion ( this clientContext, System.Version minimallyRequiredVersion ) : bool
clientContext this
minimallyRequiredVersion System.Version
return bool

HasMinimalServerLibraryVersion() public static method

Checks the server library version of the context for a minimally required version
public static HasMinimalServerLibraryVersion ( this clientContext, string minimallyRequiredVersion ) : bool
clientContext this
minimallyRequiredVersion string
return bool

IsAppOnly() public static method

Checks if the used ClientContext is app-only
public static IsAppOnly ( this clientContext ) : bool
clientContext this The ClientContext to inspect
return bool