ProjectContext class

Maintains the client-side context for development with a Project Web App instance, and contains the enterprise-wide collections of Project Server objects that exist in Project Web App.

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Client.ClientRuntimeContext
    Microsoft.SharePoint.Client.ClientContext
      Microsoft.ProjectServer.Client.ProjectContext

Namespace:  Microsoft.ProjectServer.Client
Assembly:  Microsoft.ProjectServer.Client (in Microsoft.ProjectServer.Client.dll)

Syntax

'Declaration
Public Class ProjectContext _
    Inherits ClientContext
'Usage
Dim instance As ProjectContext
public class ProjectContext : ClientContext

Remarks

Because the ProjectContext object inherits from ClientContext in SharePoint, you can also access the SharePoint CSOM through the ProjectContext object. It is not necessary to instantiate a ProjectServer object, which the client-side code uses internally.

Note

An advantage of the ProjectContext class is that it includes the WaitForQueue method. If you used the ProjectServer class, you would have to develop your own routines to wait for a queue job to complete.

For more information about the ProjectContext class, see Getting started with the Project Server CSOM and .NET. For code examples, see WaitForQueue(QueueJob, Int32) and Projects.

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See also

Reference

ProjectContext members

Microsoft.ProjectServer.Client namespace