public override object Evaluate()

in src/main/csharp/Selector/MinusExpression.cs [36:64]


        public override object Evaluate(MessageEvaluationContext message)
        {
            object lvalue = Left.Evaluate(message);
            if(lvalue == null) return null;

            object rvalue = Right.Evaluate(message);
            if(rvalue == null) return null;

            AlignedNumericValues values = new AlignedNumericValues(lvalue, rvalue);

            object result = null;

            switch(values.TypeEnum)
            {
                case AlignedNumericValues.T.SByteType : result = (sbyte )values.Left - (sbyte )values.Right; break;
                case AlignedNumericValues.T.ByteType  : result = (byte  )values.Left - (byte  )values.Right; break;
                case AlignedNumericValues.T.CharType  : result = (char  )values.Left - (char  )values.Right; break;
                case AlignedNumericValues.T.ShortType : result = (short )values.Left - (short )values.Right; break;
                case AlignedNumericValues.T.UShortType: result = (ushort)values.Left - (ushort)values.Right; break;
                case AlignedNumericValues.T.IntType   : result = (int   )values.Left - (int   )values.Right; break;
                case AlignedNumericValues.T.UIntType  : result = (uint  )values.Left - (uint  )values.Right; break;
                case AlignedNumericValues.T.LongType  : result = (long  )values.Left - (long  )values.Right; break;
                case AlignedNumericValues.T.ULongType : result = (ulong )values.Left - (ulong )values.Right; break;
                case AlignedNumericValues.T.FloatType : result = (float )values.Left - (float )values.Right; break;
                case AlignedNumericValues.T.DoubleType: result = (double)values.Left - (double)values.Right; break;
            }

            return result;
        }