/// <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()); } }
/// <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 & b.</returns> public int Compare(T a, T b) { return(GuidOps.Compare(a.Guid, b.Guid)); }
/// <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 & b.</returns> public int Compare(Guid a, Guid b) { return(GuidOps.Compare(a, b)); }
public static Guid Add(this Guid guid, int value) { return(GuidOps.Add(guid, value)); }
public static Guid Increment(this Guid guid) { return(GuidOps.Increment(guid)); }
// ReSharper disable once InconsistentNaming public static Guid XOR(this Guid guid, Guid otherGuid) { return(GuidOps.XOR(guid, otherGuid)); }