Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = UserScriptHash.GetHashCode();
         hashCode = (hashCode * 397) ^ TimestampMS.GetHashCode();
         hashCode = (hashCode * 397) ^ AssetScriptHash.GetHashCode();
         hashCode = (hashCode * 397) ^ BlockXferNotificationIndex.GetHashCode();
         return(hashCode);
     }
 }
Exemplo n.º 3
0
 public bool Equals(Nep17TransferKey other)
 {
     if (ReferenceEquals(null, other))
     {
         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));
 }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
 public override int GetHashCode()
 {
     return(HashCode.Combine(UserScriptHash.GetHashCode(), TimestampMS.GetHashCode(), AssetScriptHash.GetHashCode(), BlockXferNotificationIndex.GetHashCode(), Token.GetHashCode()));
 }