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(); }
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); }
public Proxy(DurationValue value) { _value = value; }