ProjectContext class
維護與Project Web App的執行個體,開發的用戶端內容,並包含整個企業的集合在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
'宣告
Public Class ProjectContext _
Inherits ClientContext
'用途
Dim instance As ProjectContext
public class ProjectContext : ClientContext
備註
因為ProjectContext物件是繼承自ClientContext在 SharePoint 中,您也可以透過ProjectContext物件存取 SharePoint CSOM。您不需要執行個體化的ProjectServer物件,用戶端程式碼會在內部使用。
注意事項 |
---|
ProjectContext類別的好處是它包含的WaitForQueue方法。如果您使用ProjectServer類別,您必須開發自己的常式,以等候佇列工作完成。 |
如需有關ProjectContext類別的詳細資訊,請參閱Getting started with the Project Server CSOM and .NET。如需程式碼範例,請參閱WaitForQueue(QueueJob, Int32)和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.