Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The lock manager lock frame for object lock.
Namespace: Microsoft.TeamFoundation.Framework.Server
Assembly: Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)
Syntax
'Declaration
Public Structure ObjectLockFrame _
Implements IDisposable
public struct ObjectLockFrame : IDisposable
public value class ObjectLockFrame : IDisposable
[<Sealed>]
type ObjectLockFrame =
struct
interface IDisposable
end
JScript supports the use of structures, but not the declaration of new ones.
The LockManager.ObjectLockFrame type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() |
Dispose | Disposes the LockFrame - releases the lock. |
![]() |
Equals | Indicates whether this instance and a specified object are equal. (Inherited from ValueType.) |
![]() |
GetHashCode | Returns the hash code for this instance. (Inherited from ValueType.) |
![]() |
GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() |
ToString | Returns the fully qualified type name of this instance. (Inherited from ValueType.) |
Top
Remarks
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).
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.