Share via


SharedResourceWebService4.RequestLock Method

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.

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

See Also

Reference

SharedResourceWebService4 Class

Microsoft.TeamFoundation.Build.Server Namespace