Partager via


LockManager.TestLock Method (String, LockManager.LockType, Int64)

Test if this thread already holds a lock.

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

Syntax

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

Parameters

Return Value

Type: System.Boolean
True if the current thread already holds that lock, false otherwise.

.NET Framework Security

See Also

Reference

LockManager Class

TestLock Overload

Microsoft.TeamFoundation.Framework.Server Namespace