protected override ValueProxy Promote(ValueProxy val)
 {
     if (val.IsNumeric())
     {
         return(new ShadowProxy(val));
     }
     if (val.GetValueCode() == DurationValue.ProxyValueCode)
     {
         DurationValue duration = (DurationValue)val.Value;
         return(new Proxy(new DayTimeDurationValue(duration.LowPartValue)));
     }
     throw new InvalidCastException();
 }
Exemple #2
0
        public override bool Equals(object obj)
        {
            DurationValue other = obj as DurationValue;

            if (other != null)
            {
                if (other.IsZero && IsZero)
                {
                    return(true);
                }
                return(HighPartValue == other.HighPartValue &&
                       LowPartValue == other.LowPartValue);
            }
            return(false);
        }
Exemple #3
0
 public Proxy(DurationValue value)
 {
     _value = value;
 }