CSharpTest.Net
WriteLock Structure
Members  Example  See Also  Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Synchronization Namespace : WriteLock Structure

Glossary Item Box

Allows a write lock to be disposed

Syntax

Visual Basic (Declaration) 
Public Structure WriteLock 
   Inherits System.ValueType
C# 
public struct WriteLock : System.ValueType 

Example

Library/Library.Test/LockingTests/TestIgnoreLocking.cs

C#Copy Code
using (ILockStrategy l = LockFactory.Create())
{
    Assert.AreEqual(0, l.WriteVersion);
    using(l.Write())
        Assert.AreEqual(0, l.WriteVersion);
    Assert.AreEqual(0, l.WriteVersion);
}
VB.NETCopy Code
Using l As ILockStrategy = LockFactory.Create()
    Assert.AreEqual(0, l.WriteVersion)
    Using l.Write()
        Assert.AreEqual(0, l.WriteVersion)
    End Using
    Assert.AreEqual(0, l.WriteVersion)
End Using

Inheritance Hierarchy

System.Object
   System.ValueType
      CSharpTest.Net.Synchronization.WriteLock

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Reference

WriteLock Members
CSharpTest.Net.Synchronization Namespace
WriteLock ILockStrategy.Write()
WriteLock ILockStrategy.Write(Int32)
WriteLock ReservedWriteLocking.Write()
WriteLock ReservedWriteLocking.Write(Int32)
WriteLock DebugLocking.Write(Int32)
WriteLock DebugLocking.Write()
WriteLock ExclusiveLocking.Write()
WriteLock ExclusiveLocking.Write(Int32)
WriteLock IgnoreLocking.Write()
WriteLock IgnoreLocking.Write(Int32)
WriteLock ReaderWriterLocking.Write()
WriteLock ReaderWriterLocking.Write(Int32)
WriteLock SimpleReadWriteLocking.Write()
WriteLock SimpleReadWriteLocking.Write(Int32)
WriteLock WriterOnlyLocking.Write()
WriteLock WriterOnlyLocking.Write(Int32)

Used By

BPlusTree.Rollback()
BPlusTree.UnloadCache()
BPlusTree.Clear()
ThreadedBTreeTest.TestCallLevelLocking()
IDictionary SynchronizedDictionary.ReplaceStorage(IDictionary)
SynchronizedDictionary.Add(TKey,TValue)
Boolean SynchronizedDictionary.Remove(TKey)
SynchronizedDictionary.Clear()
TValue SynchronizedDictionary.GetOrAdd(TKey,TValue)
TValue SynchronizedDictionary.GetOrAdd(TKey,Converter)
Boolean SynchronizedDictionary.TryAdd(TKey,TValue)
Boolean SynchronizedDictionary.TryAdd(TKey,Converter)
TValue SynchronizedDictionary.AddOrUpdate(TKey,TValue,KeyValueUpdate)
TValue SynchronizedDictionary.AddOrUpdate(TKey,Converter,KeyValueUpdate)
Boolean SynchronizedDictionary.AddOrUpdate(TKey,T)
Boolean SynchronizedDictionary.TryUpdate(TKey,TValue)
Boolean SynchronizedDictionary.TryUpdate(TKey,TValue,TValue)
Boolean SynchronizedDictionary.TryUpdate(TKey,KeyValueUpdate)
Boolean SynchronizedDictionary.TryRemove(TKey,TValue)
Boolean SynchronizedDictionary.TryRemove(TKey,KeyValuePredicate)
Boolean SynchronizedDictionary.TryRemove(TKey,T)
IList SynchronizedList.ReplaceStorage(IList)
Int32 SynchronizedList.Add(T)
SynchronizedList.Insert(Int32,T)
Boolean SynchronizedList.Remove(T)
SynchronizedList.RemoveAt(Int32)
SynchronizedList.Clear()

Source Code

Library/Synchronization/WriteLock.cs

Generated with Document! X 2011 by Innovasys