LockManager.TryGetLock Method (Object, LockManager.LockType, Int64)

Try to get a lock.

Namespace: Microsoft.TeamFoundation.Framework.Server
Assembly: Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Public Function TryGetLock ( _
    lockObject As Object, _
    lockType As LockManager.LockType, _
    requestId As Long _
) As Boolean
public bool TryGetLock(
    Object lockObject,
    LockManager.LockType lockType,
    long requestId
)
public:
bool TryGetLock(
    Object^ lockObject, 
    LockManager::LockType lockType, 
    long long requestId
)
member TryGetLock : 
        lockObject:Object * 
        lockType:LockManager.LockType * 
        requestId:int64 -> bool
public function TryGetLock(
    lockObject : Object, 
    lockType : LockManager.LockType, 
    requestId : long
) : boolean

Parameters

Return Value

Type: System.Boolean
True if successfully acquired a given lock, false if some other thread held a lock.

.NET Framework Security

See Also

Reference

LockManager Class

TryGetLock Overload

Microsoft.TeamFoundation.Framework.Server Namespace