Partager via


SharedResourceWebService4.ReleaseLock Method

Releases 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 ReleaseLock ( _
    resourceName As String, _
    instanceId As String, _
    requestedBy As String _
)
[WebMethodAttribute]
[ClientServiceMethodAttribute(AsyncPattern = true, SyncPattern = true)]
public void ReleaseLock(
    string resourceName,
    string instanceId,
    string requestedBy
)
[WebMethodAttribute]
[ClientServiceMethodAttribute(AsyncPattern = true, SyncPattern = true)]
public:
void ReleaseLock(
    String^ resourceName, 
    String^ instanceId, 
    String^ requestedBy
)
[<WebMethodAttribute>]
[<ClientServiceMethodAttribute(AsyncPattern = true, SyncPattern = true)>]
member ReleaseLock : 
        resourceName:string * 
        instanceId:string * 
        requestedBy:string -> unit
public function ReleaseLock(
    resourceName : String, 
    instanceId : String, 
    requestedBy : String
)

Parameters

  • resourceName
    Type: System.String

    The name of the resource to release the lock on.

  • instanceId
    Type: System.String

    An instance identifier. This is used to differentiate requests from the same requester.

  • requestedBy
    Type: System.String

    The name or an identifier for the original requester of the lock.

Remarks

If the lock is currently held, it will be released. If the lock is not held by the requester, but there is a request pending, the request will be canceled. If neither a lock nor a pending request is present, the server will not report an error.

.NET Framework Security

See Also

Reference

SharedResourceWebService4 Class

Microsoft.TeamFoundation.Build.Server Namespace