public override IMeasureBasic calculate(IMeasure second, operation op)
        {
            switch (op)
            {
            case operation.none:
                primValue = null;
                break;

            case operation.assign:
            case operation.plus:
                primValue = second.getValue <T>();
                break;

            case operation.minus:
                T vl = second.getValue <T>();
                if (primValue == vl)
                {
                    primValue = null;
                }
                break;

            default:
                break;
            }
            return(this);
        }
Beispiel #2
0
        /// <summary>
        /// Calculates the specified second.
        /// </summary>
        /// <param name="second">The second.</param>
        /// <param name="op">The op.</param>
        /// <returns></returns>
        public override IMeasureBasic calculate(IMeasure second, operation op)
        {
            Boolean a = primValue;

            primValue = a.calculate(op, second.getValue <Boolean>());

            return(this);
            //Int32 i = primValue.imbConvertValueSafe<Int32>();

            //.calculate(op, second.getValue<Int32>());
        }
Beispiel #3
0
        /// <summary>
        /// Calculates the specified second.
        /// </summary>
        /// <param name="second">The second.</param>
        /// <param name="op">The op.</param>
        /// <returns></returns>
        public IMeasureBasic calculate(IMeasure second, operation op)
        {
            if (second is IMeasure)
            {
                IMeasure second_IMeasure = (IMeasure)second;
                second_IMeasure.convertToUnit(info.unit);

                primValue = primValue.calculate(op, second.getValue <Decimal>());
            }

            return(this);
        }
 public override IMeasureBasic calculate(IMeasure second, operation op)
 {
     primValue = this.primValue.calculate(op, second.getValue <Decimal>());
     return(this);
 }