Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

LockManager.ObjectLockFrame Structure

The lock manager lock frame for object lock.

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

public struct ObjectLockFrame : IDisposable

The LockManager.ObjectLockFrame 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(lockObject, 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:
© 2015 Microsoft