Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Attempts to synchronously acquire a lock on the specified resource.
Namespace:  Microsoft.TeamFoundation.Build.Workflow.Services
Assembly:  Microsoft.TeamFoundation.Build.Workflow (in Microsoft.TeamFoundation.Build.Workflow.dll)
Syntax
'Declaration
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
)
IAsyncResult^ BeginTryRequestSharedResourceLock(
    String^ resourceName, 
    String^ instanceId, 
    Uri^ buildUri, 
    AsyncCallback^ callback, 
    Object^ state
)
abstract BeginTryRequestSharedResourceLock : 
        resourceName:string * 
        instanceId:string * 
        buildUri:Uri * 
        callback:AsyncCallback * 
        state:Object -> IAsyncResult
function BeginTryRequestSharedResourceLock(
    resourceName : String, 
    instanceId : String, 
    buildUri : Uri, 
    callback : AsyncCallback, 
    state : Object
) : IAsyncResult
Parameters
- resourceName 
 Type: System.String- The resource name 
- instanceId
 Type: System.String
- buildUri 
 Type: System.Uri- The build URI 
- callback
 Type: System.AsyncCallback
- state
 Type: System.Object
Return Value
Type: System.IAsyncResult
True if the lock is acquired successfully, false otherwise
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.