Esempio n. 1
0
 public static object Multiply(object x, object y)
 {
     if (ObjectValue.IsBool(x, y))
     {
         return(BooleanValue.Multiply((bool)x, (bool)y));
     }
     if (ObjectValue.IsAnyDouble(x, y))
     {
         return(DoubleMath.Multiply(DoubleValue.ToDouble(x), DoubleValue.ToDouble(y)));
     }
     if (ObjectValue.IsAnyDecimal(x, y))
     {
         return(DecimalValue.Multiply(DecimalValue.ToDecimal(x), DecimalValue.ToDecimal(y)));
     }
     return(null);
 }
Esempio n. 2
0
 public static object Add(object x, object y)
 {
     if (ObjectValue.IsBool(x, y))
     {
         return(BooleanValue.Add((bool)x, (bool)y));
     }
     if (ObjectValue.IsString(x, y))
     {
         return(StringValue.Add((string)x, (string)y));
     }
     if (ObjectValue.IsDateTime(x, y))
     {
         return(DateTimeMath.Add((DateTime)x, (DateTime)y));
     }
     if (ObjectValue.IsAnyDouble(x, y))
     {
         return(DoubleMath.Add(DoubleValue.ToDouble(x), DoubleValue.ToDouble(y)));
     }
     if (ObjectValue.IsAnyDecimal(x, y))
     {
         return(DecimalValue.Add(DecimalValue.ToDecimal(x), DecimalValue.ToDecimal(y)));
     }
     return(null);
 }
Esempio n. 3
0
 public static bool Add(bool b1, bool b2)
 {
     return(BooleanValue.Or(b1, b2));
 }