public virtual void Deserialize(ref MemoryReader reader) { UserScriptHash.Deserialize(ref reader); TimestampMS = BitConverter.IsLittleEndian ? BinaryPrimitives.ReverseEndianness(reader.ReadUInt64()) : reader.ReadUInt64(); AssetScriptHash.Deserialize(ref reader); BlockXferNotificationIndex = reader.ReadUInt32(); }
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 bool Equals(Nep17TransferKey other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(UserScriptHash.Equals(other.UserScriptHash) && TimestampMS.Equals(other.TimestampMS) && AssetScriptHash.Equals(other.AssetScriptHash) && BlockXferNotificationIndex.Equals(other.BlockXferNotificationIndex)); }
public int CompareTo(Nep11TransferKey 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); } var result4 = BlockXferNotificationIndex.CompareTo(other.BlockXferNotificationIndex); if (result4 != 0) { return(result4); } return((Token.GetInteger() - other.Token.GetInteger()).Sign); }
public override int GetHashCode() { return(HashCode.Combine(UserScriptHash.GetHashCode(), TimestampMS.GetHashCode(), AssetScriptHash.GetHashCode(), BlockXferNotificationIndex.GetHashCode(), Token.GetHashCode())); }