共用方式為


ISharedResourceExtension.BeginTryRequestSharedResourceLock 方法

嘗試以同步方式取得指定之資源上的鎖定。

命名空間:  Microsoft.TeamFoundation.Build.Workflow.Services
組件:  Microsoft.TeamFoundation.Build.Workflow (在 Microsoft.TeamFoundation.Build.Workflow.dll 中)

語法

'宣告
Function BeginTryRequestSharedResourceLock ( _
    resourceName As String, _
    instanceId As String, _
    buildUri As Uri, _
    callback As AsyncCallback, _
    state As Object _
) As IAsyncResult
IAsyncResult BeginTryRequestSharedResourceLock(
    string resourceName,
    string instanceId,
    Uri buildUri,
    AsyncCallback callback,
    Object state
)

參數

傳回值

類型:System.IAsyncResult
則為 true,如果鎖定已成功取得,否則為 false。

.NET Framework 安全性

請參閱

參考

ISharedResourceExtension 介面

Microsoft.TeamFoundation.Build.Workflow.Services 命名空間