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
lockObject
Type: System.ObjectThe lock to acquire.
lockType
Type: Microsoft.TeamFoundation.Framework.Server.LockManager.LockTypeThe lock type to obtain.
- requestId
Type: System.Int64
Return Value
Type: System.Boolean
True if successfully acquired a given lock, false if some other thread held a lock.
.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.