Esempio n. 1
0
 /// <summary>
 /// Gets the next guid from this Guid Generator.
 /// </summary>
 /// <returns></returns>
 public Guid Next()
 {
     if (!m_passThrough)
     {
         m_current = GuidOps.Increment(m_current);
         m_current = GuidOps.XOR(m_maskGuid, m_current);
         m_current = GuidOps.Rotate(m_current, m_rotateBits);
         return(m_current);
     }
     else
     {
         return(Guid.NewGuid());
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Compares the specified a with the specified b by binary values.
 /// </summary>
 /// <param name="a">One IHasIdentity implementer.</param>
 /// <param name="b">The other IHasIdentity implementer.</param>
 /// <returns>-1, 0 or 1, depending on the relationship between a &amp; b.</returns>
 public int Compare(T a, T b)
 {
     return(GuidOps.Compare(a.Guid, b.Guid));
 }
Esempio n. 3
0
 /// <summary>
 /// Compares the specified Guid a with the specified Guid b by binary values.
 /// </summary>
 /// <param name="a">One Guid.</param>
 /// <param name="b">The other Guid.</param>
 /// <returns>-1, 0 or 1, depending on the relationship between a &amp; b.</returns>
 public int Compare(Guid a, Guid b)
 {
     return(GuidOps.Compare(a, b));
 }
Esempio n. 4
0
 public static Guid Add(this Guid guid, int value)
 {
     return(GuidOps.Add(guid, value));
 }
Esempio n. 5
0
 public static Guid Increment(this Guid guid)
 {
     return(GuidOps.Increment(guid));
 }
Esempio n. 6
0
 // ReSharper disable once InconsistentNaming
 public static Guid XOR(this Guid guid, Guid otherGuid)
 {
     return(GuidOps.XOR(guid, otherGuid));
 }