コード例 #1
0
 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();
 }
コード例 #2
0
ファイル: DurationValue.cs プロジェクト: semyonc/xpath2
        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);
        }
コード例 #3
0
ファイル: DurationValue.cs プロジェクト: semyonc/xpath2
 public Proxy(DurationValue value)
 {
     _value = value;
 }