Partilhar via


SharedResourceWebService.RequestLock Method

Requests a shared resource lock.

Namespace:  Microsoft.TeamFoundation.Build.Server.Compatibility
Assembly:  Microsoft.TeamFoundation.Build.Server (in Microsoft.TeamFoundation.Build.Server.dll)

Syntax

'Declaration
<WebMethodAttribute> _
Public Sub RequestLock ( _
    resourceName As String, _
    instanceId As String, _
    requestedBy As String, _
    buildUri As String _
)
[WebMethodAttribute]
public void RequestLock(
    string resourceName,
    string instanceId,
    string requestedBy,
    string buildUri
)
[WebMethodAttribute]
public:
void RequestLock(
    String^ resourceName, 
    String^ instanceId, 
    String^ requestedBy, 
    String^ buildUri
)
[<WebMethodAttribute>]
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 requester.

  • 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

SharedResourceWebService Class

Microsoft.TeamFoundation.Build.Server.Compatibility Namespace