CSharpTest.Net
WriteVersion Property
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Synchronization Namespace > ILockStrategy Interface : WriteVersion Property

Glossary Item Box

The the current writer sequence number

Syntax

Visual Basic (Declaration) 
ReadOnly Property WriteVersion As Integer
C# 
int WriteVersion {get;}

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

Requirements

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

See Also

Generated with Document! X 2011 by Innovasys