Beispiel #1
0
        private static void DefineOperatorsExtension(ReactiveServiceContext context)
        {
            #region Aggregates

            #region Average
            context.DefineObservable <IReactiveQbservable <Int32>, Double>(new Uri(ReactiveConstants.Observable.Average.NoSelector.Int32), source => source.Average(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int32> >, Double>(new Uri(ReactiveConstants.Observable.Average.Selector.Int32), (source, selector) => source.Average(selector), null);
            context.DefineObservable <IReactiveQbservable <Int64>, Double>(new Uri(ReactiveConstants.Observable.Average.NoSelector.Int64), source => source.Average(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int64> >, Double>(new Uri(ReactiveConstants.Observable.Average.Selector.Int64), (source, selector) => source.Average(selector), null);
            context.DefineObservable <IReactiveQbservable <Single>, Single>(new Uri(ReactiveConstants.Observable.Average.NoSelector.Single), source => source.Average(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Single> >, Single>(new Uri(ReactiveConstants.Observable.Average.Selector.Single), (source, selector) => source.Average(selector), null);
            context.DefineObservable <IReactiveQbservable <Double>, Double>(new Uri(ReactiveConstants.Observable.Average.NoSelector.Double), source => source.Average(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Double> >, Double>(new Uri(ReactiveConstants.Observable.Average.Selector.Double), (source, selector) => source.Average(selector), null);
            context.DefineObservable <IReactiveQbservable <Decimal>, Decimal>(new Uri(ReactiveConstants.Observable.Average.NoSelector.Decimal), source => source.Average(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Decimal> >, Decimal>(new Uri(ReactiveConstants.Observable.Average.Selector.Decimal), (source, selector) => source.Average(selector), null);
            context.DefineObservable <IReactiveQbservable <Int32?>, Double?>(new Uri(ReactiveConstants.Observable.Average.NoSelector.NullableInt32), source => source.Average(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int32?> >, Double?>(new Uri(ReactiveConstants.Observable.Average.Selector.NullableInt32), (source, selector) => source.Average(selector), null);
            context.DefineObservable <IReactiveQbservable <Int64?>, Double?>(new Uri(ReactiveConstants.Observable.Average.NoSelector.NullableInt64), source => source.Average(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int64?> >, Double?>(new Uri(ReactiveConstants.Observable.Average.Selector.NullableInt64), (source, selector) => source.Average(selector), null);
            context.DefineObservable <IReactiveQbservable <Single?>, Single?>(new Uri(ReactiveConstants.Observable.Average.NoSelector.NullableSingle), source => source.Average(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Single?> >, Single?>(new Uri(ReactiveConstants.Observable.Average.Selector.NullableSingle), (source, selector) => source.Average(selector), null);
            context.DefineObservable <IReactiveQbservable <Double?>, Double?>(new Uri(ReactiveConstants.Observable.Average.NoSelector.NullableDouble), source => source.Average(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Double?> >, Double?>(new Uri(ReactiveConstants.Observable.Average.Selector.NullableDouble), (source, selector) => source.Average(selector), null);
            context.DefineObservable <IReactiveQbservable <Decimal?>, Decimal?>(new Uri(ReactiveConstants.Observable.Average.NoSelector.NullableDecimal), source => source.Average(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Decimal?> >, Decimal?>(new Uri(ReactiveConstants.Observable.Average.Selector.NullableDecimal), (source, selector) => source.Average(selector), null);
            #endregion

            #region Min
            context.DefineObservable <IReactiveQbservable <Int32>, Int32>(new Uri(ReactiveConstants.Observable.Min.NoSelector.Int32), source => source.Min(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int32> >, Int32>(new Uri(ReactiveConstants.Observable.Min.Selector.Int32), (source, selector) => source.Min(selector), null);
            context.DefineObservable <IReactiveQbservable <Int64>, Int64>(new Uri(ReactiveConstants.Observable.Min.NoSelector.Int64), source => source.Min(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int64> >, Int64>(new Uri(ReactiveConstants.Observable.Min.Selector.Int64), (source, selector) => source.Min(selector), null);
            context.DefineObservable <IReactiveQbservable <Single>, Single>(new Uri(ReactiveConstants.Observable.Min.NoSelector.Single), source => source.Min(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Single> >, Single>(new Uri(ReactiveConstants.Observable.Min.Selector.Single), (source, selector) => source.Min(selector), null);
            context.DefineObservable <IReactiveQbservable <Double>, Double>(new Uri(ReactiveConstants.Observable.Min.NoSelector.Double), source => source.Min(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Double> >, Double>(new Uri(ReactiveConstants.Observable.Min.Selector.Double), (source, selector) => source.Min(selector), null);
            context.DefineObservable <IReactiveQbservable <Decimal>, Decimal>(new Uri(ReactiveConstants.Observable.Min.NoSelector.Decimal), source => source.Min(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Decimal> >, Decimal>(new Uri(ReactiveConstants.Observable.Min.Selector.Decimal), (source, selector) => source.Min(selector), null);
            context.DefineObservable <IReactiveQbservable <Int32?>, Int32?>(new Uri(ReactiveConstants.Observable.Min.NoSelector.NullableInt32), source => source.Min(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int32?> >, Int32?>(new Uri(ReactiveConstants.Observable.Min.Selector.NullableInt32), (source, selector) => source.Min(selector), null);
            context.DefineObservable <IReactiveQbservable <Int64?>, Int64?>(new Uri(ReactiveConstants.Observable.Min.NoSelector.NullableInt64), source => source.Min(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int64?> >, Int64?>(new Uri(ReactiveConstants.Observable.Min.Selector.NullableInt64), (source, selector) => source.Min(selector), null);
            context.DefineObservable <IReactiveQbservable <Single?>, Single?>(new Uri(ReactiveConstants.Observable.Min.NoSelector.NullableSingle), source => source.Min(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Single?> >, Single?>(new Uri(ReactiveConstants.Observable.Min.Selector.NullableSingle), (source, selector) => source.Min(selector), null);
            context.DefineObservable <IReactiveQbservable <Double?>, Double?>(new Uri(ReactiveConstants.Observable.Min.NoSelector.NullableDouble), source => source.Min(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Double?> >, Double?>(new Uri(ReactiveConstants.Observable.Min.Selector.NullableDouble), (source, selector) => source.Min(selector), null);
            context.DefineObservable <IReactiveQbservable <Decimal?>, Decimal?>(new Uri(ReactiveConstants.Observable.Min.NoSelector.NullableDecimal), source => source.Min(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Decimal?> >, Decimal?>(new Uri(ReactiveConstants.Observable.Min.Selector.NullableDecimal), (source, selector) => source.Min(selector), null);
            #endregion

            #region Max
            context.DefineObservable <IReactiveQbservable <Int32>, Int32>(new Uri(ReactiveConstants.Observable.Max.NoSelector.Int32), source => source.Max(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int32> >, Int32>(new Uri(ReactiveConstants.Observable.Max.Selector.Int32), (source, selector) => source.Max(selector), null);
            context.DefineObservable <IReactiveQbservable <Int64>, Int64>(new Uri(ReactiveConstants.Observable.Max.NoSelector.Int64), source => source.Max(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int64> >, Int64>(new Uri(ReactiveConstants.Observable.Max.Selector.Int64), (source, selector) => source.Max(selector), null);
            context.DefineObservable <IReactiveQbservable <Single>, Single>(new Uri(ReactiveConstants.Observable.Max.NoSelector.Single), source => source.Max(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Single> >, Single>(new Uri(ReactiveConstants.Observable.Max.Selector.Single), (source, selector) => source.Max(selector), null);
            context.DefineObservable <IReactiveQbservable <Double>, Double>(new Uri(ReactiveConstants.Observable.Max.NoSelector.Double), source => source.Max(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Double> >, Double>(new Uri(ReactiveConstants.Observable.Max.Selector.Double), (source, selector) => source.Max(selector), null);
            context.DefineObservable <IReactiveQbservable <Decimal>, Decimal>(new Uri(ReactiveConstants.Observable.Max.NoSelector.Decimal), source => source.Max(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Decimal> >, Decimal>(new Uri(ReactiveConstants.Observable.Max.Selector.Decimal), (source, selector) => source.Max(selector), null);
            context.DefineObservable <IReactiveQbservable <Int32?>, Int32?>(new Uri(ReactiveConstants.Observable.Max.NoSelector.NullableInt32), source => source.Max(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int32?> >, Int32?>(new Uri(ReactiveConstants.Observable.Max.Selector.NullableInt32), (source, selector) => source.Max(selector), null);
            context.DefineObservable <IReactiveQbservable <Int64?>, Int64?>(new Uri(ReactiveConstants.Observable.Max.NoSelector.NullableInt64), source => source.Max(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int64?> >, Int64?>(new Uri(ReactiveConstants.Observable.Max.Selector.NullableInt64), (source, selector) => source.Max(selector), null);
            context.DefineObservable <IReactiveQbservable <Single?>, Single?>(new Uri(ReactiveConstants.Observable.Max.NoSelector.NullableSingle), source => source.Max(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Single?> >, Single?>(new Uri(ReactiveConstants.Observable.Max.Selector.NullableSingle), (source, selector) => source.Max(selector), null);
            context.DefineObservable <IReactiveQbservable <Double?>, Double?>(new Uri(ReactiveConstants.Observable.Max.NoSelector.NullableDouble), source => source.Max(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Double?> >, Double?>(new Uri(ReactiveConstants.Observable.Max.Selector.NullableDouble), (source, selector) => source.Max(selector), null);
            context.DefineObservable <IReactiveQbservable <Decimal?>, Decimal?>(new Uri(ReactiveConstants.Observable.Max.NoSelector.NullableDecimal), source => source.Max(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Decimal?> >, Decimal?>(new Uri(ReactiveConstants.Observable.Max.Selector.NullableDecimal), (source, selector) => source.Max(selector), null);
            #endregion

            #region Sum
            context.DefineObservable <IReactiveQbservable <Int32>, Int32>(new Uri(ReactiveConstants.Observable.Sum.NoSelector.Int32), source => source.Sum(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int32> >, Int32>(new Uri(ReactiveConstants.Observable.Sum.Selector.Int32), (source, selector) => source.Sum(selector), null);
            context.DefineObservable <IReactiveQbservable <Int64>, Int64>(new Uri(ReactiveConstants.Observable.Sum.NoSelector.Int64), source => source.Sum(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int64> >, Int64>(new Uri(ReactiveConstants.Observable.Sum.Selector.Int64), (source, selector) => source.Sum(selector), null);
            context.DefineObservable <IReactiveQbservable <Single>, Single>(new Uri(ReactiveConstants.Observable.Sum.NoSelector.Single), source => source.Sum(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Single> >, Single>(new Uri(ReactiveConstants.Observable.Sum.Selector.Single), (source, selector) => source.Sum(selector), null);
            context.DefineObservable <IReactiveQbservable <Double>, Double>(new Uri(ReactiveConstants.Observable.Sum.NoSelector.Double), source => source.Sum(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Double> >, Double>(new Uri(ReactiveConstants.Observable.Sum.Selector.Double), (source, selector) => source.Sum(selector), null);
            context.DefineObservable <IReactiveQbservable <Decimal>, Decimal>(new Uri(ReactiveConstants.Observable.Sum.NoSelector.Decimal), source => source.Sum(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Decimal> >, Decimal>(new Uri(ReactiveConstants.Observable.Sum.Selector.Decimal), (source, selector) => source.Sum(selector), null);
            context.DefineObservable <IReactiveQbservable <Int32?>, Int32?>(new Uri(ReactiveConstants.Observable.Sum.NoSelector.NullableInt32), source => source.Sum(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int32?> >, Int32?>(new Uri(ReactiveConstants.Observable.Sum.Selector.NullableInt32), (source, selector) => source.Sum(selector), null);
            context.DefineObservable <IReactiveQbservable <Int64?>, Int64?>(new Uri(ReactiveConstants.Observable.Sum.NoSelector.NullableInt64), source => source.Sum(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Int64?> >, Int64?>(new Uri(ReactiveConstants.Observable.Sum.Selector.NullableInt64), (source, selector) => source.Sum(selector), null);
            context.DefineObservable <IReactiveQbservable <Single?>, Single?>(new Uri(ReactiveConstants.Observable.Sum.NoSelector.NullableSingle), source => source.Sum(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Single?> >, Single?>(new Uri(ReactiveConstants.Observable.Sum.Selector.NullableSingle), (source, selector) => source.Sum(selector), null);
            context.DefineObservable <IReactiveQbservable <Double?>, Double?>(new Uri(ReactiveConstants.Observable.Sum.NoSelector.NullableDouble), source => source.Sum(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Double?> >, Double?>(new Uri(ReactiveConstants.Observable.Sum.Selector.NullableDouble), (source, selector) => source.Sum(selector), null);
            context.DefineObservable <IReactiveQbservable <Decimal?>, Decimal?>(new Uri(ReactiveConstants.Observable.Sum.NoSelector.NullableDecimal), source => source.Sum(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, Decimal?> >, Decimal?>(new Uri(ReactiveConstants.Observable.Sum.Selector.NullableDecimal), (source, selector) => source.Sum(selector), null);
            #endregion

            #endregion
        }
Beispiel #2
0
        private static void DefineOperators(ReactiveServiceContext context)
        {
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, T, T> >, T>(new Uri(ReactiveConstants.Observable.Aggregate.Accumulate), (source, accumulate) => source.Aggregate(accumulate), null);
            context.DefineObservable <IReactiveQbservable <T>, R, Expression <Func <R, T, R> >, R>(new Uri(ReactiveConstants.Observable.Aggregate.Seed), (source, seed, accumulate) => source.Aggregate(seed, accumulate), null);
            context.DefineObservable <IReactiveQbservable <T1>, T2, Expression <Func <T2, T1, T2> >, Expression <Func <T2, R> >, R>(new Uri(ReactiveConstants.Observable.Aggregate.SeedResult), (source, seed, accumulate, selector) => source.Aggregate(seed, accumulate, selector), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, bool> >, bool>(new Uri(ReactiveConstants.Observable.All.Predicate), (source, predicate) => source.All(predicate), null);
            context.DefineObservable <IReactiveQbservable <T>, bool>(new Uri(ReactiveConstants.Observable.Any.NoArgument), source => source.Any(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, bool> >, bool>(new Uri(ReactiveConstants.Observable.Any.Predicate), (source, predicate) => source.Any(predicate), null);
            context.DefineObservable <IReactiveQbservable <T1>, IReactiveQbservable <T2>, Expression <Func <T1, T2, R> >, R>(new Uri(ReactiveConstants.Observable.CombineLatest.ObservableFunc), (source, otherSource, selector) => source.CombineLatest(otherSource, selector), null);
            context.DefineObservable <IReactiveQbservable <T>, int>(new Uri(ReactiveConstants.Observable.Count.NoArgument), source => source.Count(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, bool> >, int>(new Uri(ReactiveConstants.Observable.Count.Predicate), (source, predicate) => source.Count(predicate), null);
            context.DefineObservable <IReactiveQbservable <T>, DateTimeOffset, T>(new Uri(ReactiveConstants.Observable.DelaySubscription.DateTimeOffset), (source, dueTime) => source.DelaySubscription(dueTime), null);
            context.DefineObservable <IReactiveQbservable <T>, TimeSpan, T>(new Uri(ReactiveConstants.Observable.DelaySubscription.TimeSpan), (source, dueTime) => source.DelaySubscription(dueTime), null);
            context.DefineObservable <IReactiveQbservable <T>, T>(new Uri(ReactiveConstants.Observable.DistinctUntilChanged.NoArgument), source => source.DistinctUntilChanged(DataTypeEqualityComparer <T> .Default), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, R> >, T>(new Uri(ReactiveConstants.Observable.DistinctUntilChanged.Func), (source, keySelector) => source.DistinctUntilChanged(keySelector, DataTypeEqualityComparer <R> .Default), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Action <T> >, T>(new Uri(ReactiveConstants.Observable.Do.OnNext), (source, onNext) => source.Do(onNext), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Action <T> >, Expression <Action <Exception> >, T>(new Uri(ReactiveConstants.Observable.Do.OnNextOnError), (source, onNext, onError) => source.Do(onNext, onError), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Action <T> >, Expression <Action>, T>(new Uri(ReactiveConstants.Observable.Do.OnNextOnCompleted), (source, onNext, onCompleted) => source.Do(onNext, onCompleted), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Action <T> >, Expression <Action <Exception> >, Expression <Action>, T>(new Uri(ReactiveConstants.Observable.Do.AllActions), (source, onNext, onError, onCompleted) => source.Do(onNext, onError, onCompleted), null);
            context.DefineObservable <IReactiveQbservable <T>, IReactiveQbserver <T>, T>(new Uri(ReactiveConstants.Observable.Do.Observer), (source, observer) => source.Do(observer), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, R> >, IReactiveQbserver <R>, T>(new Uri(ReactiveConstants.Observable.Do.ObserverSelector), (source, selector, observer) => source.Do(selector, observer), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Action>, T>(new Uri(ReactiveConstants.Observable.Finally.Action), (source, action) => source.Finally(action), null);
            context.DefineObservable <IReactiveQbservable <T>, T>(new Uri(ReactiveConstants.Observable.FirstAsync.NoArgument), source => source.FirstAsync(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, bool> >, T>(new Uri(ReactiveConstants.Observable.FirstAsync.Func), (source, predicate) => source.FirstAsync(predicate), null);
            context.DefineObservable <IReactiveQbservable <T>, T>(new Uri(ReactiveConstants.Observable.FirstOrDefaultAsync.NoArgument), source => source.FirstOrDefaultAsync(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, bool> >, T>(new Uri(ReactiveConstants.Observable.FirstOrDefaultAsync.Func), (source, predicate) => source.FirstOrDefaultAsync(predicate), null);
            context.DefineObservable <IReactiveQbservable <T>, bool>(new Uri(ReactiveConstants.Observable.IsEmpty.NoArgument), source => source.IsEmpty(), null);
            context.DefineObservable <IReactiveQbservable <T>, long>(new Uri(ReactiveConstants.Observable.LongCount.NoArgument), source => source.LongCount(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, bool> >, long>(new Uri(ReactiveConstants.Observable.LongCount.Predicate), (source, predicate) => source.LongCount(predicate), null);
            context.DefineObservable <IReactiveQbservable <T>, T>(new Uri(ReactiveConstants.Observable.Retry.NoArgument), source => source.Retry(), null);
            context.DefineObservable <IReactiveQbservable <T>, int, T>(new Uri(ReactiveConstants.Observable.Retry.Count), (source, retryCount) => source.Retry(retryCount), null);
            context.DefineObservable <T, T>(new Uri(ReactiveConstants.Observable.Return.Value), value => ReactiveQbservable.Return(value), null);
            context.DefineObservable <IReactiveQbservable <T>, TimeSpan, T>(new Uri(ReactiveConstants.Observable.Sample.TimeSpan), (source, interval) => source.Sample(interval), null);
            context.DefineObservable <IReactiveQbservable <T>, IReactiveQbservable <R>, T>(new Uri(ReactiveConstants.Observable.Sample.Observable), (source, sampler) => source.Sample(sampler), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, T, T> >, T>(new Uri(ReactiveConstants.Observable.Scan.Accumulate), (source, aggregate) => source.Scan(aggregate), null);
            context.DefineObservable <IReactiveQbservable <T>, R, Expression <Func <R, T, R> >, R>(new Uri(ReactiveConstants.Observable.Scan.Seed), (source, seed, aggregate) => source.Scan(seed, aggregate), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, R> >, R>(new Uri(ReactiveConstants.Observable.Select.Func), (source, selector) => source.Select(selector), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, int, R> >, R>(new Uri(ReactiveConstants.Observable.Select.IndexedFunc), (source, selector) => source.Select(selector), null);
            context.DefineObservable <IReactiveQbservable <T>, IReactiveQbservable <T>, bool>(new Uri(ReactiveConstants.Observable.SequenceEqual.NoArgument), (left, right) => left.SequenceEqual(right), null);
            context.DefineObservable <IReactiveQbservable <T>, int, T>(new Uri(ReactiveConstants.Observable.Skip.Int), (source, count) => source.Skip(count), null);
            context.DefineObservable <IReactiveQbservable <T>, TimeSpan, T>(new Uri(ReactiveConstants.Observable.Skip.TimeSpan), (source, dueTime) => source.Skip(dueTime), null);
            context.DefineObservable <IReactiveQbservable <T>, DateTimeOffset, T>(new Uri(ReactiveConstants.Observable.SkipUntil.DateTimeOffset), (source, dueTime) => source.SkipUntil(dueTime), null);
            context.DefineObservable <IReactiveQbservable <T1>, IReactiveQbservable <T2>, T1>(new Uri(ReactiveConstants.Observable.SkipUntil.Observable), (source, triggeringSource) => source.SkipUntil(triggeringSource), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, bool> >, T>(new Uri(ReactiveConstants.Observable.SkipWhile.Func), (source, predicate) => source.SkipWhile(predicate), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, int, bool> >, T>(new Uri(ReactiveConstants.Observable.SkipWhile.IndexedFunc), (source, predicate) => source.SkipWhile(predicate), null);
            context.DefineObservable <IReactiveQbservable <T>, T[], T>(new Uri(ReactiveConstants.Observable.StartWith.Array), (source, values) => source.StartWith(values), null);
            context.DefineObservable <IReactiveQbservable <T>, int, T>(new Uri(ReactiveConstants.Observable.Take.Int), (source, count) => source.Take(count), null);
            context.DefineObservable <IReactiveQbservable <T>, TimeSpan, T>(new Uri(ReactiveConstants.Observable.Take.TimeSpan), (source, duration) => source.Take(duration), null);
            context.DefineObservable <IReactiveQbservable <T>, DateTimeOffset, T>(new Uri(ReactiveConstants.Observable.TakeUntil.DateTimeOffset), (source, startTime) => source.TakeUntil(startTime), null);
            context.DefineObservable <IReactiveQbservable <T1>, IReactiveQbservable <T2>, T1>(new Uri(ReactiveConstants.Observable.TakeUntil.Observable), (source, other) => source.TakeUntil(other), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, bool> >, T>(new Uri(ReactiveConstants.Observable.TakeWhile.Func), (source, predicate) => source.TakeWhile(predicate), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, int, bool> >, T>(new Uri(ReactiveConstants.Observable.TakeWhile.IndexedFunc), (source, predicate) => source.TakeWhile(predicate), null);
            context.DefineObservable <DateTimeOffset, long>(new Uri(ReactiveConstants.Observable.Timer.DateTimeOffset), dueTime => ReactiveQbservable.Timer(dueTime), null);
            context.DefineObservable <DateTimeOffset, TimeSpan, long>(new Uri(ReactiveConstants.Observable.Timer.DateTimeOffsetTimeSpan), (dueTime, period) => ReactiveQbservable.Timer(dueTime, period), null);
            context.DefineObservable <TimeSpan, long>(new Uri(ReactiveConstants.Observable.Timer.TimeSpan), dueTime => ReactiveQbservable.Timer(dueTime), null);
            context.DefineObservable <TimeSpan, TimeSpan, long>(new Uri(ReactiveConstants.Observable.Timer.TimeSpanTimeSpan), (dueTime, period) => ReactiveQbservable.Timer(dueTime, period), null);
            context.DefineObservable <IReactiveQbservable <T>, IList <T> >(new Uri(ReactiveConstants.Observable.ToList.NoArgument), source => source.ToList(), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, bool> >, T>(new Uri(ReactiveConstants.Observable.Where.Func), (source, predicate) => source.Where(predicate), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, int, bool> >, T>(new Uri(ReactiveConstants.Observable.Where.IndexedFunc), (source, predicate) => source.Where(predicate), null);

            // Non-parameterized defines
            var emptyFactory    = (Expression <Func <IReactiveQbservable <T> > >)(() => ReactiveQbservable.Empty <T>());
            var emptyObservable = context.Provider.CreateQbservable <T>(emptyFactory.Body);

            context.DefineObservable <T>(new Uri(ReactiveConstants.Observable.Empty.NoArgument), emptyObservable, null);

            var neverFactory    = (Expression <Func <IReactiveQbservable <T> > >)(() => ReactiveQbservable.Never <T>());
            var neverObservable = context.Provider.CreateQbservable <T>(neverFactory.Body);

            context.DefineObservable <T>(new Uri(ReactiveConstants.Observable.Never.NoArgument), neverObservable, null);

            // Higher order defines
            context.DefineObservable <IReactiveQbservable <IReactiveObservable <T> >, T>(new Uri(ReactiveConstants.Observable.Merge.NoArgument), source => source.To <IReactiveQbservable <IReactiveObservable <T> >, IReactiveQbservable <IReactiveObservable <T> > >().Merge(), null);
            context.DefineObservable <IReactiveQbservable <IReactiveObservable <T> >, T>(new Uri(ReactiveConstants.Observable.Switch.NoArgument), source => source.To <IReactiveQbservable <IReactiveObservable <T> >, IReactiveQbservable <IReactiveObservable <T> > >().Switch(), null);
            context.DefineObservable <IReactiveQbservable <T>, TimeSpan, T>(new Uri(ReactiveConstants.Observable.Throttle.TimeSpan), (source, dueTime) => source.Throttle(_ => ReactiveQbservable.Timer(dueTime)), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, IReactiveQbservable <R> > >, R>(
                new Uri(ReactiveConstants.Observable.SelectMany.Func),
                (source, selector) => source.SelectMany(selector.To <Expression <Func <T, IReactiveQbservable <R> > >, Expression <Func <T, IReactiveQbservable <R> > > >()),
                null);
            context.DefineObservable <IReactiveQbservable <T1>, Expression <Func <T1, IReactiveQbservable <T2> > >, Expression <Func <T1, T2, R> >, R>(
                new Uri(ReactiveConstants.Observable.SelectMany.FuncFunc),
                (source, collectionSelector, resultSelector) => source.SelectMany(collectionSelector.To <Expression <Func <T1, IReactiveQbservable <T2> > >, Expression <Func <T1, IReactiveQbservable <T2> > > >(), resultSelector),
                null);
            context.DefineObservable <IReactiveQbservable <T>, TimeSpan, IReactiveQbservable <T> >(new Uri(ReactiveConstants.Observable.Window.TimeDuration), (source, duration) => source.Window(duration).To <IReactiveQbservable <IReactiveQbservable <T> >, IReactiveQbservable <IReactiveQbservable <T> > >(), null);
            context.DefineObservable <IReactiveQbservable <T>, TimeSpan, TimeSpan, IReactiveQbservable <T> >(new Uri(ReactiveConstants.Observable.Window.TimeDurationShift), (source, duration, shift) => source.Window(duration, shift).To <IReactiveQbservable <IReactiveQbservable <T> >, IReactiveQbservable <IReactiveQbservable <T> > >(), null);
            context.DefineObservable <IReactiveQbservable <T>, int, IReactiveQbservable <T> >(new Uri(ReactiveConstants.Observable.Window.Count), (source, count) => source.Window(count).To <IReactiveQbservable <IReactiveQbservable <T> >, IReactiveQbservable <IReactiveQbservable <T> > >(), null);
            context.DefineObservable <IReactiveQbservable <T>, int, int, IReactiveQbservable <T> >(new Uri(ReactiveConstants.Observable.Window.CountSkip), (source, count, skip) => source.Window(count, skip).To <IReactiveQbservable <IReactiveQbservable <T> >, IReactiveQbservable <IReactiveQbservable <T> > >(), null);
            context.DefineObservable <IReactiveQbservable <T>, TimeSpan, int, IReactiveQbservable <T> >(new Uri(ReactiveConstants.Observable.Window.TimeCount), (source, duration, count) => source.Window(duration, count).To <IReactiveQbservable <IReactiveQbservable <T> >, IReactiveQbservable <IReactiveQbservable <T> > >(), null);

            context.DefineObservable <IReactiveQbservable <T>, TimeSpan, IList <T> >(new Uri(ReactiveConstants.Observable.Buffer.TimeDuration), (source, duration) => source.Buffer(duration).To <IReactiveQbservable <IList <T> >, IReactiveQbservable <IList <T> > >(), null);
            context.DefineObservable <IReactiveQbservable <T>, TimeSpan, TimeSpan, IList <T> >(new Uri(ReactiveConstants.Observable.Buffer.TimeDurationShift), (source, duration, shift) => source.Buffer(duration, shift).To <IReactiveQbservable <IList <T> >, IReactiveQbservable <IList <T> > >(), null);
            context.DefineObservable <IReactiveQbservable <T>, int, IList <T> >(new Uri(ReactiveConstants.Observable.Buffer.Count), (source, count) => source.Buffer(count).To <IReactiveQbservable <IList <T> >, IReactiveQbservable <IList <T> > >(), null);
            context.DefineObservable <IReactiveQbservable <T>, int, int, IList <T> >(new Uri(ReactiveConstants.Observable.Buffer.CountSkip), (source, count, skip) => source.Buffer(count, skip).To <IReactiveQbservable <IList <T> >, IReactiveQbservable <IList <T> > >(), null);
            context.DefineObservable <IReactiveQbservable <T>, TimeSpan, int, IList <T> >(new Uri(ReactiveConstants.Observable.Buffer.TimeCount), (source, duration, count) => source.Buffer(duration, count).To <IReactiveQbservable <IList <T> >, IReactiveQbservable <IList <T> > >(), null);

            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, T1> >, IReactiveGroupedQbservable <T1, T> >(new Uri(ReactiveConstants.Observable.GroupBy.Key), (source, keySelector) => source.GroupBy(keySelector), null);
            context.DefineObservable <IReactiveQbservable <T>, Expression <Func <T, T1> >, Expression <Func <T, T2> >, IReactiveGroupedQbservable <T1, T2> >(new Uri(ReactiveConstants.Observable.GroupBy.KeyElement), (source, keySelector, elementSelector) => source.GroupBy(keySelector, elementSelector), null);

            // Extension defines
            DefineOperatorsExtension(context);
        }