public int CompareTo(Nep17TransferKey other) { if (other is null) { return(1); } if (ReferenceEquals(this, other)) { return(0); } int result = UserScriptHash.CompareTo(other.UserScriptHash); if (result != 0) { return(result); } int result2 = TimestampMS.CompareTo(other.TimestampMS); if (result2 != 0) { return(result2); } int result3 = AssetScriptHash.CompareTo(other.AssetScriptHash); if (result3 != 0) { return(result3); } return(BlockXferNotificationIndex.CompareTo(other.BlockXferNotificationIndex)); }
public void TestCompareTo() { byte[] temp = new byte[20]; temp[19] = 0x01; UInt160 result = new UInt160(temp); Assert.AreEqual(0, UInt160.Zero.CompareTo(UInt160.Zero)); Assert.AreEqual(-1, UInt160.Zero.CompareTo(result)); Assert.AreEqual(1, result.CompareTo(UInt160.Zero)); }
public int CompareTo(Nep5BalanceKey other) { if (other is null) { return(1); } if (ReferenceEquals(this, other)) { return(0); } int result = UserScriptHash.CompareTo(other.UserScriptHash); if (result != 0) { return(result); } return(AssetScriptHash.CompareTo(other.AssetScriptHash)); }
public int CompareTo(Nep11BalanceKey other) { if (other is null) { return(1); } if (ReferenceEquals(this, other)) { return(0); } int result = UserScriptHash.CompareTo(other.UserScriptHash); if (result != 0) { return(result); } result = AssetScriptHash.CompareTo(other.AssetScriptHash); if (result != 0) { return(result); } return((Token.GetInteger() - other.Token.GetInteger()).Sign); }