Exemple #1
0
        public override bool CanMergeWith(Transaction transaction)
        {
            if (!(transaction is IndexedIntegerTransaction))
            {
                return(false);
            }

            IndexedIntegerTransaction other = (IndexedIntegerTransaction)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);
        }
Exemple #2
0
        public override void MergeIn(Transaction transaction)
        {
            IndexedIntegerTransaction other = (IndexedIntegerTransaction)transaction;

            newValue = other.newValue;
        }