This documentation is archived and is not being maintained.

LockManager::NamedLockFrame Structure

The lock manager lock frame for named lock.

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

public value class NamedLockFrame : IDisposable

The LockManager::NamedLockFrame type exposes the following members.

  NameDescription
Public methodDisposeDisposes the LockFrame - releases the lock.
Public methodEqualsIndicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Public methodGetHashCodeReturns the hash code for this instance. (Inherited from ValueType.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns the fully qualified type name of this instance. (Inherited from ValueType.)
Top

Use pattern: ... any work before lock is taken using (LockManager.Lock(lockName, lockType)) { ... some work inside a lock } ... any work after lock is released Please do not use outside this pattern. Be very careful - this is a disposable struct (that is not a class but a value type).

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: