public void Test_Values(uint era, ulong id) { var g = new GDID(era, id); var str = g.ToString(); var hex = g.ToHexString(); var g2 = GDID.Parse(str); var g3 = GDID.Parse(hex); Aver.AreEqual(g, g2); Aver.AreEqual(g, g3); Aver.AreEqual(g2, g3); Aver.AreObjectsEqual(g, g2); Aver.AreObjectsEqual(g, g3); Aver.AreObjectsEqual(g2, g3); Aver.IsTrue(g == g2); Aver.IsTrue(g == g3); Aver.IsTrue(g2 == g3); Aver.IsFalse(g != g3); Aver.IsFalse(g != g2); Aver.IsFalse(g2 != g3); Aver.AreEqual(g.GetHashCode(), g2.GetHashCode()); Aver.AreEqual(g.GetHashCode(), g3.GetHashCode()); Aver.AreEqual(g.GetDistributedStableHash(), g2.GetDistributedStableHash()); Aver.AreEqual(g.GetDistributedStableHash(), g3.GetDistributedStableHash()); var json = new { g }.ToJson(); "String: {0} \n Hex: {1} \n Json: {2} \n".SeeArgs(str, hex, json); var got = json.JsonToDataObject() as JsonDataMap; Aver.AreEqual(g, got["g"].AsGDID()); var buf = g.Bytes; var g4 = new GDID(buf); Aver.AreEqual(g, g4); var buf2 = new byte[128]; g.WriteIntoBuffer(buf2, 18); var g5 = new GDID(buf2, 18); Aver.AreEqual(g, g5); }
public override int GetHashCode() { return(GDID.GetHashCode() ^ ISO); }
public override int GetHashCode() { return(GDID1.GetHashCode() ^ GDID2.GetHashCode() ^ ISO ^ YMD); }
public override int GetHashCode() { return(m_SysID.GetHashCode()); }
public override int GetHashCode() { return(GDID1.GetHashCode() ^ GDID2.GetHashCode() ^ ISO ^ PAYLOAD.GetHashCode()); }
public override int GetHashCode() => Value.GetHashCode() ^ Bookmark.GetHashCode();
public override int GetHashCode() { return(MailboxID.GetHashCode() ^ G_Message.GetHashCode()); }
public override int GetHashCode() { return(Channel.GetHashCode() ^ G_Shard.GetHashCode() ^ G_Mailbox.GetHashCode()); }
public override int GetHashCode() => Id.GetHashCode();
public override int GetHashCode() { return(G_Volume.GetHashCode() ^ G_Comment.GetHashCode()); }
public override int GetHashCode() { return(G_TargetNode.GetHashCode() ^ BlockIndex); }