コード例 #1
0
        public override bool CanMergeWith(Transaction transaction)
        {
            if (!(transaction is IndexedUnsignedTransaction))
            {
                return(false);
            }

            IndexedUnsignedTransaction other = (IndexedUnsignedTransaction)transaction;

            //In order to merge two transactions, the transactions must be operating on the same exact object and field.
            //Indexed transactions need to share indices too
            if (other.target == target &&
                other.property == property &&
                other.index == index)
            {
                return(true);
            }
            return(false);
        }
コード例 #2
0
        public override void MergeIn(Transaction transaction)
        {
            IndexedUnsignedTransaction other = (IndexedUnsignedTransaction)transaction;

            newValue = other.newValue;
        }