Пример #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));
        }
Пример #2
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);
        }