Requests a shared resource lock.
Namespace:  Microsoft.TeamFoundation.Build.Server
Assembly:  Microsoft.TeamFoundation.Build.Server (in Microsoft.TeamFoundation.Build.Server.dll)
Syntax
'Declaration
<WebMethodAttribute> _
<ClientServiceMethodAttribute(AsyncPattern := True, SyncPattern := True)> _
Public Sub RequestLock ( _
    resourceName As String, _
    instanceId As String, _
    requestedBy As String, _
    buildUri As String _
)
[WebMethodAttribute]
[ClientServiceMethodAttribute(AsyncPattern = true, SyncPattern = true)]
public void RequestLock(
    string resourceName,
    string instanceId,
    string requestedBy,
    string buildUri
)
[WebMethodAttribute]
[ClientServiceMethodAttribute(AsyncPattern = true, SyncPattern = true)]
public:
void RequestLock(
    String^ resourceName, 
    String^ instanceId, 
    String^ requestedBy, 
    String^ buildUri
)
[<WebMethodAttribute>]
[<ClientServiceMethodAttribute(AsyncPattern = true, SyncPattern = true)>]
member RequestLock : 
        resourceName:string * 
        instanceId:string * 
        requestedBy:string * 
        buildUri:string -> unit
public function RequestLock(
    resourceName : String, 
    instanceId : String, 
    requestedBy : String, 
    buildUri : String
)
Parameters
- resourceName 
 Type: System.String- The name of the resource to request a lock on. 
- instanceId 
 Type: System.String- Used to differentiate requests from the same requestor. 
- requestedBy 
 Type: System.String- The name or an identifier for the requester. 
- buildUri
 Type: System.String
Remarks
If the lock is currently held by the requester, an exception will be thrown.
If there is a pending request for the resource by the requester, an exception will be thrown.
.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.