Esempio n. 1
0
 protected override ValueProxy Mul(ValueProxy value)
 {
     if (value.IsNumeric())
     {
         return(new Proxy(DayTimeDurationValue.Multiply(_value, Convert.ToDouble(value))));
     }
     throw new XPath2Exception("", Properties.Resources.BinaryOperatorNotDefined, "op:mul",
                               new SequenceType(_value.GetType(), XmlTypeCardinality.One),
                               new SequenceType(value.Value.GetType(), XmlTypeCardinality.One));
 }
Esempio n. 2
0
        protected override ValueProxy Mul(ValueProxy val)
        {
            switch (val.GetValueCode())
            {
            case YearMonthDurationValue.ProxyValueCode:
                return(new YearMonthDurationValue.Proxy(
                           YearMonthDurationValue.Multiply((YearMonthDurationValue)val.Value, Convert.ToDouble(_value))));

            case DayTimeDurationValue.ProxyValueCode:
                return(new DayTimeDurationValue.Proxy(
                           DayTimeDurationValue.Multiply((DayTimeDurationValue)val.Value, Convert.ToDouble(_value))));

            default:
                throw new XPath2Exception("", Resources.BinaryOperatorNotDefined, "op:mul",
                                          new SequenceType(Value.GetType(), XmlTypeCardinality.One),
                                          new SequenceType(val.Value.GetType(), XmlTypeCardinality.One));
            }
        }