コード例 #1
0
        public IncrementConstantValue(IConstantValue baseValue, int incrementAmount = 1)
        {
            if (baseValue == null)
            {
                throw new ArgumentNullException("baseValue");
            }
            IncrementConstantValue icv = baseValue as IncrementConstantValue;

            if (icv != null)
            {
                this.baseValue       = icv.baseValue;
                this.incrementAmount = icv.incrementAmount + incrementAmount;
            }
            else
            {
                this.baseValue       = baseValue;
                this.incrementAmount = incrementAmount;
            }
        }
コード例 #2
0
        bool ISupportsInterning.EqualsForInterning(ISupportsInterning other)
        {
            IncrementConstantValue o = other as IncrementConstantValue;

            return(o != null && baseValue == o.baseValue && incrementAmount == o.incrementAmount);
        }