Compartilhar via


ClientContext Members

Include Protected Members
Include Inherited Members

Represents the context for SharePoint objects and operations.

The ClientContext type exposes the following members.

Constructors

  Name Description
Public method ClientContext(String) Initializes a new instance of the ClientContext class for the SharePoint site with the specified absolute URL.
Public method ClientContext(Uri) Initializes a new instance of the ClientContext class for the site with the specified Uri object.

Top

Properties

  Name Description
Public property ApplicationName Gets or sets the name of the runtime where the current client application is located. (Inherited from ClientRuntimeContext.)
Public property AuthenticationMode Gets or sets the authentication mode for the client context. (Inherited from ClientRuntimeContext.)
Public property Credentials Gets or sets the authentication information for the client context. (Inherited from ClientRuntimeContext.)
Public propertyStatic member Current Gets the current client context of the client-side object model (CSOM) runtime.
Public property FormsAuthenticationLoginInfo Gets or sets the login information for the forms authentication mode of the client context. (Inherited from ClientRuntimeContext.)
Public property HasPendingRequest Gets the flag that indicates whether the client context has the ClientRequest to be sent to the server. (Inherited from ClientRuntimeContext.)
Public property PendingRequest Gets the ClientRequest object that is sent to the server when the next ExecuteQuery() is executed. (Inherited from ClientRuntimeContext.)
Public property RequestTimeout Gets or sets the requested time-out value in milliseconds. (Inherited from ClientRuntimeContext.)
Public property ServerLibraryVersion Gets the build version of Microsoft.SharePoint.Client.ServerRuntime.dll on the server. (Inherited from ClientRuntimeContext.)
Public property ServerSchemaVersion Gets the schema version of Microsoft.SharePoint.Client.ServerRuntime.dll on the server. (Inherited from ClientRuntimeContext.)
Public property ServerVersion Gets the version of the current SharePoint Server.
Public property Site Gets the site collection that is associated with the client context.
Public property StaticObjects This member is reserved for internal use and is not intended to be used directly from your code. (Inherited from ClientRuntimeContext.)
Public property Tag Gets or sets the object that stores custom data about the client context. (Inherited from ClientRuntimeContext.)
Public property Url Gets the URL associated with the runtime context. (Inherited from ClientRuntimeContext.)
Public property ValidateOnClient Gets or sets the flag that indicates whether the client library needs to validate the method parameters on the client side. (Inherited from ClientRuntimeContext.)
Public property Web Gets the Web site that is associated with the client context.
Public property WebRequestExecutorFactory Gets or sets the factory to create the WebRequestExecutor that is used to send the request to and get the response from the server. (Inherited from ClientRuntimeContext.)

Top

Methods

  Name Description
Public method AddQuery This member is reserved for internal use and is not intended to be used directly from your code. (Inherited from ClientRuntimeContext.)
Public method AddQueryIdAndResultObject This member is reserved for internal use and is not intended to be used directly from your code. (Inherited from ClientRuntimeContext.)
Public method CastTo<T> Casts a specified client object to its derived type. (Inherited from ClientRuntimeContext.)
Public method Dispose() Disposes of the runtime context. (Inherited from ClientRuntimeContext.)
Protected method Dispose(Boolean) Disposes of the runtime context depending on the specified Boolean value. (Inherited from ClientRuntimeContext.)
Public method ExecuteQuery Executes the current set of data retrieval queries and method invocations. (Overrides ClientRuntimeContext.ExecuteQuery().)
Public method ExecuteQueryAsync (Overrides ClientRuntimeContext.ExecuteQueryAsync(ClientRequestSucceededEventHandler, ClientRequestFailedEventHandler).)
Public method Load<T> Retrieves the properties of a client object from the server. (Inherited from ClientRuntimeContext.)
Public method LoadQuery<T>(IQueryable<T>) Retrieves an enumerable sequence of the child client objects from a collection that can be the query expression in LINQ syntax. (Inherited from ClientRuntimeContext.)
Public method LoadQuery<T>(ClientObjectCollection<T>) Retrieves an enumerable sequence of the child client objects from a collection. (Inherited from ClientRuntimeContext.)
Protected method OnExecutingWebRequest Raises the ExecutingWebRequest event. (Inherited from ClientRuntimeContext.)
Public method ParseObjectFromJsonString Parses the specified JavaScript Object Notation (JSON) string and gets an object from it. (Inherited from ClientRuntimeContext.)
Public method ToString (Inherited from Object.)

Top

Events

  Name Description
Public event ExecutingWebRequest An event that is raised when the Web request is sent to the server. (Inherited from ClientRuntimeContext.)

Top

See Also

Reference

ClientContext Class

Microsoft.SharePoint.Client Namespace