示例#1
0
 private void AddElements(IEnumerableExpression <T> elements)
 {
     if (elements != null)
     {
         if (Incremental)
         {
             var incElements = elements.AsNotifiable();
             foreach (var node in incElements)
             {
                 nodes.Add(node, new EulerVertex(node, this));
             }
             foreach (var vertex in nodes.Values)
             {
                 CreateEdgesFor(vertex);
             }
             incElements.Successors.Set(this);
             this.incElements = incElements;
         }
         else
         {
             foreach (var node in elements)
             {
                 nodes.Add(node, new EulerVertex(node, this));
             }
             foreach (var vertex in nodes.Values)
             {
                 CreateEdgesFor(vertex);
             }
         }
     }
 }
示例#2
0
 private void PerformIncrementalLookup()
 {
     if (incremental == null)
     {
         incremental = new IncrementalLookup <TSource, TKey>(source.AsNotifiable(), keySelector);
         incremental.Successors.SetDummy();
     }
 }
示例#3
0
 private void AddElements(IEnumerableExpression <T> elements)
 {
     if (elements != null)
     {
         if (Incremental)
         {
             var incElements = elements.AsNotifiable();
             foreach (var node in incElements)
             {
                 GetOrCreate(node, true);
             }
             incElements.CollectionChanged += RootElementsChanged;
             this.incElements = incElements;
         }
         else
         {
             foreach (var node in elements)
             {
                 GetOrCreate(node, true);
             }
         }
     }
 }
示例#4
0
 public static ObservableAny <TSource> CreateExpression(IEnumerableExpression <TSource> source)
 {
     return(new ObservableAny <TSource>(source.AsNotifiable()));
 }
示例#5
0
 public static ObservableFirstOrDefault <TSource> CreateExpression(IEnumerableExpression <TSource> source)
 {
     return(Create(source.AsNotifiable()));
 }
示例#6
0
 public static INotifyValue <float?> SumLambdaNullableFloatExpression <TSource>(IEnumerableExpression <TSource> source, Expression <Func <TSource, float?> > selector)
 {
     return(SumNullableFloat(source.AsNotifiable().Select(selector)));
 }
示例#7
0
 public static INotifyValue <long> SumLambdaLongExpression <TSource>(IEnumerableExpression <TSource> source, Expression <Func <TSource, long> > selector)
 {
     return(SumLong(source.AsNotifiable().Select(selector)));
 }
示例#8
0
 public static INotifyValue <decimal?> SumNullableDecimalExpression(IEnumerableExpression <decimal?> source)
 {
     return(SumNullableDecimal(source.AsNotifiable()));
 }
示例#9
0
 public static INotifyValue <long?> SumNullableLongExpression(IEnumerableExpression <long?> source)
 {
     return(SumNullableLong(source.AsNotifiable()));
 }
示例#10
0
 public static INotifyValue<T?> LambdaNullableMaxExpression<TSource, T>(IEnumerableExpression<TSource> source, Expression<Func<TSource, T?>> selector) where T : struct
 {
     return LambdaNullableMaxWithComparer(source.AsNotifiable(), selector, null);
 }
示例#11
0
 public static INotifyValue<T?> NullableMaxExpression<T>(IEnumerableExpression<T?> source) where T : struct
 {
     return NullableMaxWithComparer(source.AsNotifiable(), null);
 }
示例#12
0
 public static INotifyValue <float?> CreateNullableFloatExpression <TSource>(this IEnumerableExpression <TSource> source, Expression <Func <TSource, float?> > predicate)
 {
     return(ObservableNullableFloatAverage.Create(source.AsNotifiable().Select(predicate)));
 }
示例#13
0
 public static INotifyValue <decimal> CreateDecimalExpression <TSource>(this IEnumerableExpression <TSource> source, Expression <Func <TSource, decimal> > predicate)
 {
     return(ObservableDecimalAverage.Create(source.AsNotifiable().Select(predicate)));
 }
示例#14
0
 public static ObservableNullableDecimalAverage CreateExpression(IEnumerableExpression <decimal?> source)
 {
     return(Create(source.AsNotifiable()));
 }
示例#15
0
 public static INotifyValue <double> CreateLongExpression <TSource>(this IEnumerableExpression <TSource> source, Expression <Func <TSource, long> > predicate)
 {
     return(ObservableLongAverage.Create(source.AsNotifiable().Select(predicate)));
 }
示例#16
0
 public static INotifyValue <int> SumIntExpression(IEnumerableExpression <int> source)
 {
     return(SumInt(source.AsNotifiable()));
 }
示例#17
0
 public static INotifyValue <double> SumDoubleExpression(IEnumerableExpression <double> source)
 {
     return(SumDouble(source.AsNotifiable()));
 }
示例#18
0
 public static INotifyValue<T> MinExpressionWithComparer<T>(IEnumerableExpression<T> source, IComparer<T> comparer)
 {
     return MinWithComparer(source.AsNotifiable(), comparer);
 }
示例#19
0
 public static INotifyValue <float?> SumNullableFloatExpression(IEnumerableExpression <float?> source)
 {
     return(SumNullableFloat(source.AsNotifiable()));
 }
示例#20
0
 public static INotifyValue<TResult> LambdaMinExpression<TSource, TResult>(IEnumerableExpression<TSource> source, Expression<Func<TSource, TResult>> selector)
 {
     return LambdaMinWithComparer(source.AsNotifiable(), selector, null);
 }
示例#21
0
 public static INotifyValue <int> SumLambdaIntExpression <TSource>(IEnumerableExpression <TSource> source, Expression <Func <TSource, int> > selector)
 {
     return(SumInt(source.AsNotifiable().Select(selector)));
 }
示例#22
0
 public static INotifyValue<TResult> LambdaMinExpressionWithComparer<TSource, TResult>(IEnumerableExpression<TSource> source, Expression<Func<TSource, TResult>> selector, IComparer<TResult> comparer)
 {
     return MinWithComparer(source.AsNotifiable().Select(selector), comparer);
 }
示例#23
0
 public static INotifyValue <double> SumLambdaDoubleExpression <TSource>(IEnumerableExpression <TSource> source, Expression <Func <TSource, double> > selector)
 {
     return(SumDouble(source.AsNotifiable().Select(selector)));
 }
示例#24
0
 public static INotifyValue<T?> NullableMinExpressionWithComparer<T>(IEnumerableExpression<T?> source, IComparer<T> comparer) where T : struct
 {
     return NullableMinWithComparer(source.AsNotifiable(), comparer);
 }
示例#25
0
 public static INotifyValue <decimal?> SumLambdaNullableDecimalExpression <TSource>(IEnumerableExpression <TSource> source, Expression <Func <TSource, decimal?> > selector)
 {
     return(SumNullableDecimal(source.AsNotifiable().Select(selector)));
 }
示例#26
0
 public static INotifyValue<T?> LambdaNullableMinExpressionWithComparer<TSource, T>(IEnumerableExpression<TSource> source, Expression<Func<TSource, T?>> selector, IComparer<T> comparer) where T : struct
 {
     return NullableMinWithComparer(source.AsNotifiable().Select(selector), comparer);
 }
示例#27
0
 public static ObservableSingleOrDefault <TSource> CreateExpressionForPredicate(IEnumerableExpression <TSource> source, Expression <Func <TSource, bool> > predicate)
 {
     return(new ObservableSingleOrDefault <TSource>(source.AsNotifiable().Where(predicate)));
 }
示例#28
0
 public static INotifyValue<T> MaxExpression<T>(IEnumerableExpression<T> source)
 {
     return MaxWithComparer(source.AsNotifiable(), null);
 }
示例#29
0
 public static ObservableLambdaAny <TSource> CreateExpression(IEnumerableExpression <TSource> source, Expression <Func <TSource, bool> > selector)
 {
     return(new ObservableLambdaAny <TSource>(source.AsNotifiable(), selector));
 }
示例#30
0
 public static INotifyValue <KeyValuePair <TItem, TKey>[]> CreateExpressionSelectorComparer(IEnumerableExpression <TItem> source, int x, Expression <Func <TItem, TKey> > selector, IComparer <TKey> comparer)
 {
     return(CreateSelectorComparer(source.AsNotifiable(), x, selector, comparer));
 }