Parameters
- other
Library/Library.Test/TestDbGuid.cs
C# | Copy Code |
---|---|
DbGuid last = DbGuid.NewGuid(); for (int i = 0; i < 10000; i++) { DbGuid test = DbGuid.NewGuid(); TestSequence(last, test); TestSequence(last, test.ToSqlGuid()); TestSequence(last.ToSqlGuid(), test); TestSequence(last.ToSqlGuid(), test.ToSqlGuid()); Assert.IsTrue(last.CompareTo(test) < 0); last = test; } |
VB.NET | Copy Code |
---|---|
Dim last As DbGuid = DbGuid.NewGuid() Dim i As Integer = 0 While i < 10000 Dim test As DbGuid = DbGuid.NewGuid() TestSequence(last, test) TestSequence(last, test.ToSqlGuid()) TestSequence(last.ToSqlGuid(), test) TestSequence(last.ToSqlGuid(), test.ToSqlGuid()) Assert.IsTrue(last.CompareTo(test) < 0) last = test System.Math.Max(System.Threading.Interlocked.Increment(i),i - 1) End While |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7