Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/rx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Rx/NET/Source/System.Reactive.Providers/Reactive/Linq/Qbservable.Generated.cs')
-rw-r--r--Rx/NET/Source/System.Reactive.Providers/Reactive/Linq/Qbservable.Generated.cs832
1 files changed, 668 insertions, 164 deletions
diff --git a/Rx/NET/Source/System.Reactive.Providers/Reactive/Linq/Qbservable.Generated.cs b/Rx/NET/Source/System.Reactive.Providers/Reactive/Linq/Qbservable.Generated.cs
index 2a5f3e4..4a73c80 100644
--- a/Rx/NET/Source/System.Reactive.Providers/Reactive/Linq/Qbservable.Generated.cs
+++ b/Rx/NET/Source/System.Reactive.Providers/Reactive/Linq/Qbservable.Generated.cs
@@ -1,5 +1,5 @@
/*
- * WARNING: Auto-generated file (1/10/2013 8:30:32 PM)
+ * WARNING: Auto-generated file (11/21/2013 11:07:25 AM)
* Run Rx's auto-homoiconizer tool to generate this file (in the HomoIcon directory).
*/
@@ -7341,6 +7341,80 @@ namespace System.Reactive.Linq
}
/// <summary>
+ /// Groups the elements of an observable sequence with the specified initial capacity according to a specified key selector function.
+ /// </summary>
+ /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
+ /// <typeparam name="TKey">The type of the grouping key computed for each element in the source sequence.</typeparam>
+ /// <param name="source">An observable sequence whose elements to group.</param>
+ /// <param name="keySelector">A function to extract the key for each element.</param>
+ /// <param name="capacity">The initial number of elements that the underlying dictionary can contain.</param>
+ /// <returns>A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.</returns>
+ /// <exception cref="T:System.ArgumentNullException">
+ /// <paramref name="source" /> or <paramref name="keySelector" /> is null.</exception>
+ /// <exception cref="T:System.ArgumentOutOfRangeException">
+ /// <paramref name="capacity" /> is less than 0.</exception>
+ public static IQbservable<IGroupedObservable<TKey, TSource>> GroupBy<TSource, TKey>(this IQbservable<TSource> source, Expression<Func<TSource, TKey>> keySelector, int capacity)
+ {
+ if (source == null)
+ throw new ArgumentNullException("source");
+ if (keySelector == null)
+ throw new ArgumentNullException("keySelector");
+
+ return source.Provider.CreateQuery<IGroupedObservable<TKey, TSource>>(
+ Expression.Call(
+ null,
+#if CRIPPLED_REFLECTION
+ InfoOf(() => Qbservable.GroupBy<TSource, TKey>(default(IQbservable<TSource>), default(Expression<Func<TSource, TKey>>), default(int))),
+#else
+ ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)),
+#endif
+ source.Expression,
+ keySelector,
+ Expression.Constant(capacity, typeof(int))
+ )
+ );
+ }
+
+ /// <summary>
+ /// Groups the elements of an observable sequence with the specified initial capacity according to a specified key selector function and comparer.
+ /// </summary>
+ /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
+ /// <typeparam name="TKey">The type of the grouping key computed for each element in the source sequence.</typeparam>
+ /// <param name="source">An observable sequence whose elements to group.</param>
+ /// <param name="keySelector">A function to extract the key for each element.</param>
+ /// <param name="capacity">The initial number of elements that the underlying dictionary can contain.</param>
+ /// <param name="comparer">An equality comparer to compare keys with.</param>
+ /// <returns>A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.</returns>
+ /// <exception cref="T:System.ArgumentNullException">
+ /// <paramref name="source" /> or <paramref name="keySelector" /> or <paramref name="comparer" /> is null.</exception>
+ /// <exception cref="T:System.ArgumentOutOfRangeException">
+ /// <paramref name="capacity" /> is less than 0.</exception>
+ public static IQbservable<IGroupedObservable<TKey, TSource>> GroupBy<TSource, TKey>(this IQbservable<TSource> source, Expression<Func<TSource, TKey>> keySelector, int capacity, IEqualityComparer<TKey> comparer)
+ {
+ if (source == null)
+ throw new ArgumentNullException("source");
+ if (keySelector == null)
+ throw new ArgumentNullException("keySelector");
+ if (comparer == null)
+ throw new ArgumentNullException("comparer");
+
+ return source.Provider.CreateQuery<IGroupedObservable<TKey, TSource>>(
+ Expression.Call(
+ null,
+#if CRIPPLED_REFLECTION
+ InfoOf(() => Qbservable.GroupBy<TSource, TKey>(default(IQbservable<TSource>), default(Expression<Func<TSource, TKey>>), default(int), default(IEqualityComparer<TKey>))),
+#else
+ ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)),
+#endif
+ source.Expression,
+ keySelector,
+ Expression.Constant(capacity, typeof(int)),
+ Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))
+ )
+ );
+ }
+
+ /// <summary>
/// Groups the elements of an observable sequence according to a specified key selector function and comparer.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
@@ -7412,6 +7486,90 @@ namespace System.Reactive.Linq
}
/// <summary>
+ /// Groups the elements of an observable sequence with the specified initial capacity and selects the resulting elements by using a specified function.
+ /// </summary>
+ /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
+ /// <typeparam name="TKey">The type of the grouping key computed for each element in the source sequence.</typeparam>
+ /// <typeparam name="TElement">The type of the elements within the groups computed for each element in the source sequence.</typeparam>
+ /// <param name="source">An observable sequence whose elements to group.</param>
+ /// <param name="keySelector">A function to extract the key for each element.</param>
+ /// <param name="elementSelector">A function to map each source element to an element in an observable group.</param>
+ /// <param name="capacity">The initial number of elements that the underlying dictionary can contain.</param>
+ /// <returns>A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.</returns>
+ /// <exception cref="T:System.ArgumentNullException">
+ /// <paramref name="source" /> or <paramref name="keySelector" /> or <paramref name="elementSelector" /> is null.</exception>
+ /// <exception cref="T:System.ArgumentOutOfRangeException">
+ /// <paramref name="capacity" /> is less than 0.</exception>
+ public static IQbservable<IGroupedObservable<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IQbservable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, int capacity)
+ {
+ if (source == null)
+ throw new ArgumentNullException("source");
+ if (keySelector == null)
+ throw new ArgumentNullException("keySelector");
+ if (elementSelector == null)
+ throw new ArgumentNullException("elementSelector");
+
+ return source.Provider.CreateQuery<IGroupedObservable<TKey, TElement>>(
+ Expression.Call(
+ null,
+#if CRIPPLED_REFLECTION
+ InfoOf(() => Qbservable.GroupBy<TSource, TKey, TElement>(default(IQbservable<TSource>), default(Expression<Func<TSource, TKey>>), default(Expression<Func<TSource, TElement>>), default(int))),
+#else
+ ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)),
+#endif
+ source.Expression,
+ keySelector,
+ elementSelector,
+ Expression.Constant(capacity, typeof(int))
+ )
+ );
+ }
+
+ /// <summary>
+ /// Groups the elements of an observable sequence with the specified initial capacity according to a specified key selector function and comparer and selects the resulting elements by using a specified function.
+ /// </summary>
+ /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
+ /// <typeparam name="TKey">The type of the grouping key computed for each element in the source sequence.</typeparam>
+ /// <typeparam name="TElement">The type of the elements within the groups computed for each element in the source sequence.</typeparam>
+ /// <param name="source">An observable sequence whose elements to group.</param>
+ /// <param name="keySelector">A function to extract the key for each element.</param>
+ /// <param name="elementSelector">A function to map each source element to an element in an observable group.</param>
+ /// <param name="capacity">The initial number of elements that the underlying dictionary can contain.</param>
+ /// <param name="comparer">An equality comparer to compare keys with.</param>
+ /// <returns>A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.</returns>
+ /// <exception cref="T:System.ArgumentNullException">
+ /// <paramref name="source" /> or <paramref name="keySelector" /> or <paramref name="elementSelector" /> or <paramref name="comparer" /> is null.</exception>
+ /// <exception cref="T:System.ArgumentOutOfRangeException">
+ /// <paramref name="capacity" /> is less than 0.</exception>
+ public static IQbservable<IGroupedObservable<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IQbservable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, int capacity, IEqualityComparer<TKey> comparer)
+ {
+ if (source == null)
+ throw new ArgumentNullException("source");
+ if (keySelector == null)
+ throw new ArgumentNullException("keySelector");
+ if (elementSelector == null)
+ throw new ArgumentNullException("elementSelector");
+ if (comparer == null)
+ throw new ArgumentNullException("comparer");
+
+ return source.Provider.CreateQuery<IGroupedObservable<TKey, TElement>>(
+ Expression.Call(
+ null,
+#if CRIPPLED_REFLECTION
+ InfoOf(() => Qbservable.GroupBy<TSource, TKey, TElement>(default(IQbservable<TSource>), default(Expression<Func<TSource, TKey>>), default(Expression<Func<TSource, TElement>>), default(int), default(IEqualityComparer<TKey>))),
+#else
+ ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)),
+#endif
+ source.Expression,
+ keySelector,
+ elementSelector,
+ Expression.Constant(capacity, typeof(int)),
+ Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))
+ )
+ );
+ }
+
+ /// <summary>
/// Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
@@ -7493,6 +7651,100 @@ namespace System.Reactive.Linq
}
/// <summary>
+ /// Groups the elements of an observable sequence with the specified initial capacity according to a specified key selector function.
+ /// A duration selector function is used to control the lifetime of groups. When a group expires, it receives an OnCompleted notification. When a new element with the same
+ /// key value as a reclaimed group occurs, the group will be reborn with a new lifetime request.
+ /// </summary>
+ /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
+ /// <typeparam name="TKey">The type of the grouping key computed for each element in the source sequence.</typeparam>
+ /// <typeparam name="TDuration">The type of the elements in the duration sequences obtained for each group to denote its lifetime.</typeparam>
+ /// <param name="source">An observable sequence whose elements to group.</param>
+ /// <param name="keySelector">A function to extract the key for each element.</param>
+ /// <param name="durationSelector">A function to signal the expiration of a group.</param>
+ /// <param name="capacity">The initial number of elements that the underlying dictionary can contain.</param>
+ /// <returns>
+ /// A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.
+ /// If a group's lifetime expires, a new group with the same key value can be created once an element with such a key value is encoutered.
+ /// </returns>
+ /// <exception cref="T:System.ArgumentNullException">
+ /// <paramref name="source" /> or <paramref name="keySelector" /> or <paramref name="durationSelector" /> is null.</exception>
+ /// <exception cref="T:System.ArgumentOutOfRangeException">
+ /// <paramref name="capacity" /> is less than 0.</exception>
+ public static IQbservable<IGroupedObservable<TKey, TSource>> GroupByUntil<TSource, TKey, TDuration>(this IQbservable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<IGroupedObservable<TKey, TSource>, IObservable<TDuration>>> durationSelector, int capacity)
+ {
+ if (source == null)
+ throw new ArgumentNullException("source");
+ if (keySelector == null)
+ throw new ArgumentNullException("keySelector");
+ if (durationSelector == null)
+ throw new ArgumentNullException("durationSelector");
+
+ return source.Provider.CreateQuery<IGroupedObservable<TKey, TSource>>(
+ Expression.Call(
+ null,
+#if CRIPPLED_REFLECTION
+ InfoOf(() => Qbservable.GroupByUntil<TSource, TKey, TDuration>(default(IQbservable<TSource>), default(Expression<Func<TSource, TKey>>), default(Expression<Func<IGroupedObservable<TKey, TSource>, IObservable<TDuration>>>), default(int))),
+#else
+ ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TDuration)),
+#endif
+ source.Expression,
+ keySelector,
+ durationSelector,
+ Expression.Constant(capacity, typeof(int))
+ )
+ );
+ }
+
+ /// <summary>
+ /// Groups the elements of an observable sequence with the specified initial capacity according to a specified key selector function and comparer.
+ /// A duration selector function is used to control the lifetime of groups. When a group expires, it receives an OnCompleted notification. When a new element with the same
+ /// key value as a reclaimed group occurs, the group will be reborn with a new lifetime request.
+ /// </summary>
+ /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
+ /// <typeparam name="TKey">The type of the grouping key computed for each element in the source sequence.</typeparam>
+ /// <typeparam name="TDuration">The type of the elements in the duration sequences obtained for each group to denote its lifetime.</typeparam>
+ /// <param name="source">An observable sequence whose elements to group.</param>
+ /// <param name="keySelector">A function to extract the key for each element.</param>
+ /// <param name="durationSelector">A function to signal the expiration of a group.</param>
+ /// <param name="capacity">The initial number of elements that the underlying dictionary can contain.</param>
+ /// <param name="comparer">An equality comparer to compare keys with.</param>
+ /// <returns>
+ /// A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.
+ /// If a group's lifetime expires, a new group with the same key value can be created once an element with such a key value is encoutered.
+ /// </returns>
+ /// <exception cref="T:System.ArgumentNullException">
+ /// <paramref name="source" /> or <paramref name="keySelector" /> or <paramref name="durationSelector" /> or <paramref name="comparer" /> is null.</exception>
+ /// <exception cref="T:System.ArgumentOutOfRangeException">
+ /// <paramref name="capacity" /> is less than 0.</exception>
+ public static IQbservable<IGroupedObservable<TKey, TSource>> GroupByUntil<TSource, TKey, TDuration>(this IQbservable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<IGroupedObservable<TKey, TSource>, IObservable<TDuration>>> durationSelector, int capacity, IEqualityComparer<TKey> comparer)
+ {
+ if (source == null)
+ throw new ArgumentNullException("source");
+ if (keySelector == null)
+ throw new ArgumentNullException("keySelector");
+ if (durationSelector == null)
+ throw new ArgumentNullException("durationSelector");
+ if (comparer == null)
+ throw new ArgumentNullException("comparer");
+
+ return source.Provider.CreateQuery<IGroupedObservable<TKey, TSource>>(
+ Expression.Call(
+ null,
+#if CRIPPLED_REFLECTION
+ InfoOf(() => Qbservable.GroupByUntil<TSource, TKey, TDuration>(default(IQbservable<TSource>), default(Expression<Func<TSource, TKey>>), default(Expression<Func<IGroupedObservable<TKey, TSource>, IObservable<TDuration>>>), default(int), default(IEqualityComparer<TKey>))),
+#else
+ ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TDuration)),
+#endif
+ source.Expression,
+ keySelector,
+ durationSelector,
+ Expression.Constant(capacity, typeof(int)),
+ Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))
+ )
+ );
+ }
+
+ /// <summary>
/// Groups the elements of an observable sequence according to a specified key selector function and comparer.
/// A duration selector function is used to control the lifetime of groups. When a group expires, it receives an OnCompleted notification. When a new element with the same
/// key value as a reclaimed group occurs, the group will be reborn with a new lifetime request.
@@ -7584,6 +7836,110 @@ namespace System.Reactive.Linq
}
/// <summary>
+ /// Groups the elements of an observable sequence with the specified initial capacity according to a specified key selector function and selects the resulting elements by using a specified function.
+ /// A duration selector function is used to control the lifetime of groups. When a group expires, it receives an OnCompleted notification. When a new element with the same
+ /// key value as a reclaimed group occurs, the group will be reborn with a new lifetime request.
+ /// </summary>
+ /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
+ /// <typeparam name="TKey">The type of the grouping key computed for each element in the source sequence.</typeparam>
+ /// <typeparam name="TElement">The type of the elements within the groups computed for each element in the source sequence.</typeparam>
+ /// <typeparam name="TDuration">The type of the elements in the duration sequences obtained for each group to denote its lifetime.</typeparam>
+ /// <param name="source">An observable sequence whose elements to group.</param>
+ /// <param name="keySelector">A function to extract the key for each element.</param>
+ /// <param name="elementSelector">A function to map each source element to an element in an observable group.</param>
+ /// <param name="durationSelector">A function to signal the expiration of a group.</param>
+ /// <param name="capacity">The initial number of elements that the underlying dictionary can contain.</param>
+ /// <returns>
+ /// A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.
+ /// If a group's lifetime expires, a new group with the same key value can be created once an element with such a key value is encoutered.
+ /// </returns>
+ /// <exception cref="T:System.ArgumentNullException">
+ /// <paramref name="source" /> or <paramref name="keySelector" /> or <paramref name="elementSelector" /> or <paramref name="durationSelector" /> is null.</exception>
+ /// <exception cref="T:System.ArgumentOutOfRangeException">
+ /// <paramref name="capacity" /> is less than 0.</exception>
+ public static IQbservable<IGroupedObservable<TKey, TElement>> GroupByUntil<TSource, TKey, TElement, TDuration>(this IQbservable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, Expression<Func<IGroupedObservable<TKey, TElement>, IObservable<TDuration>>> durationSelector, int capacity)
+ {
+ if (source == null)
+ throw new ArgumentNullException("source");
+ if (keySelector == null)
+ throw new ArgumentNullException("keySelector");
+ if (elementSelector == null)
+ throw new ArgumentNullException("elementSelector");
+ if (durationSelector == null)
+ throw new ArgumentNullException("durationSelector");
+
+ return source.Provider.CreateQuery<IGroupedObservable<TKey, TElement>>(
+ Expression.Call(
+ null,
+#if CRIPPLED_REFLECTION
+ InfoOf(() => Qbservable.GroupByUntil<TSource, TKey, TElement, TDuration>(default(IQbservable<TSource>), default(Expression<Func<TSource, TKey>>), default(Expression<Func<TSource, TElement>>), default(Expression<Func<IGroupedObservable<TKey, TElement>, IObservable<TDuration>>>), default(int))),
+#else
+ ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TDuration)),
+#endif
+ source.Expression,
+ keySelector,
+ elementSelector,
+ durationSelector,
+ Expression.Constant(capacity, typeof(int))
+ )
+ );
+ }
+
+ /// <summary>
+ /// Groups the elements of an observable sequence with the specified initial capacity according to a specified key selector function and comparer and selects the resulting elements by using a specified function.
+ /// A duration selector function is used to control the lifetime of groups. When a group expires, it receives an OnCompleted notification. When a new element with the same
+ /// key value as a reclaimed group occurs, the group will be reborn with a new lifetime request.
+ /// </summary>
+ /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
+ /// <typeparam name="TKey">The type of the grouping key computed for each element in the source sequence.</typeparam>
+ /// <typeparam name="TElement">The type of the elements within the groups computed for each element in the source sequence.</typeparam>
+ /// <typeparam name="TDuration">The type of the elements in the duration sequences obtained for each group to denote its lifetime.</typeparam>
+ /// <param name="source">An observable sequence whose elements to group.</param>
+ /// <param name="keySelector">A function to extract the key for each element.</param>
+ /// <param name="elementSelector">A function to map each source element to an element in an observable group.</param>
+ /// <param name="durationSelector">A function to signal the expiration of a group.</param>
+ /// <param name="capacity">The initial number of elements that the underlying dictionary can contain.</param>
+ /// <param name="comparer">An equality comparer to compare keys with.</param>
+ /// <returns>
+ /// A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.
+ /// If a group's lifetime expires, a new group with the same key value can be created once an element with such a key value is encountered.
+ /// </returns>
+ /// <exception cref="T:System.ArgumentNullException">
+ /// <paramref name="source" /> or <paramref name="keySelector" /> or <paramref name="elementSelector" /> or <paramref name="durationSelector" /> or <paramref name="comparer" /> is null.</exception>
+ /// <exception cref="T:System.ArgumentOutOfRangeException">
+ /// <paramref name="capacity" /> is less than 0.</exception>
+ public static IQbservable<IGroupedObservable<TKey, TElement>> GroupByUntil<TSource, TKey, TElement, TDuration>(this IQbservable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, Expression<Func<IGroupedObservable<TKey, TElement>, IObservable<TDuration>>> durationSelector, int capacity, IEqualityComparer<TKey> comparer)
+ {
+ if (source == null)
+ throw new ArgumentNullException("source");
+ if (keySelector == null)
+ throw new ArgumentNullException("keySelector");
+ if (elementSelector == null)
+ throw new ArgumentNullException("elementSelector");
+ if (durationSelector == null)
+ throw new ArgumentNullException("durationSelector");
+ if (comparer == null)
+ throw new ArgumentNullException("comparer");
+
+ return source.Provider.CreateQuery<IGroupedObservable<TKey, TElement>>(
+ Expression.Call(
+ null,
+#if CRIPPLED_REFLECTION
+ InfoOf(() => Qbservable.GroupByUntil<TSource, TKey, TElement, TDuration>(default(IQbservable<TSource>), default(Expression<Func<TSource, TKey>>), default(Expression<Func<TSource, TElement>>), default(Expression<Func<IGroupedObservable<TKey, TElement>, IObservable<TDuration>>>), default(int), default(IEqualityComparer<TKey>))),
+#else
+ ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TDuration)),
+#endif
+ source.Expression,
+ keySelector,
+ elementSelector,
+ durationSelector,
+ Expression.Constant(capacity, typeof(int)),
+ Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))
+ )
+ );
+ }
+
+ /// <summary>
/// Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function.
/// A duration selector function is used to control the lifetime of groups. When a group expires, it receives an OnCompleted notification. When a new element with the same
/// key value as a reclaimed group occurs, the group will be reborn with a new lifetime request.
@@ -8508,27 +8864,27 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Invokes a transform function on each element of a sequence and returns the maximum nullable <see cref="T:System.Int32" /> value.
+ /// Invokes a transform function on each element of a sequence and returns the maximum <see cref="T:System.Double" /> value.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values to determine the maximum value of.</param>
/// <param name="selector">A transform function to apply to each element.</param>
- /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Nullable&lt;System.Int32&gt;" /> that corresponds to the maximum value in the source sequence.</returns>
+ /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Double" /> that corresponds to the maximum value in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<int?> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, int?>> selector)
+ public static IQbservable<double> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, double>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<int?>(
+ return source.Provider.CreateQuery<double>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, int?>>))),
+ InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, double>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -8539,27 +8895,27 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Invokes a transform function on each element of a sequence and returns the maximum nullable <see cref="T:System.Int64" /> value.
+ /// Invokes a transform function on each element of a sequence and returns the maximum <see cref="T:System.Single" /> value.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values to determine the maximum value of.</param>
/// <param name="selector">A transform function to apply to each element.</param>
- /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Nullable&lt;System.Int64&gt;" /> that corresponds to the maximum value in the source sequence.</returns>
+ /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Single" /> that corresponds to the maximum value in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<long?> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, long?>> selector)
+ public static IQbservable<float> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, float>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<long?>(
+ return source.Provider.CreateQuery<float>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, long?>>))),
+ InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, float>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -8570,27 +8926,27 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Invokes a transform function on each element of a sequence and returns the maximum <see cref="T:System.Double" /> value.
+ /// Invokes a transform function on each element of a sequence and returns the maximum <see cref="T:System.Decimal" /> value.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values to determine the maximum value of.</param>
/// <param name="selector">A transform function to apply to each element.</param>
- /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Double" /> that corresponds to the maximum value in the source sequence.</returns>
+ /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Decimal" /> that corresponds to the maximum value in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<double> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, double>> selector)
+ public static IQbservable<decimal> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, decimal>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<double>(
+ return source.Provider.CreateQuery<decimal>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, double>>))),
+ InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, decimal>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -8601,27 +8957,27 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Invokes a transform function on each element of a sequence and returns the maximum <see cref="T:System.Single" /> value.
+ /// Invokes a transform function on each element of a sequence and returns the maximum <see cref="T:System.Int32" /> value.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values to determine the maximum value of.</param>
/// <param name="selector">A transform function to apply to each element.</param>
- /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Single" /> that corresponds to the maximum value in the source sequence.</returns>
+ /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Int32" /> that corresponds to the maximum value in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<float> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, float>> selector)
+ public static IQbservable<int> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, int>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<float>(
+ return source.Provider.CreateQuery<int>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, float>>))),
+ InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, int>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -8632,27 +8988,27 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Invokes a transform function on each element of a sequence and returns the maximum <see cref="T:System.Decimal" /> value.
+ /// Invokes a transform function on each element of a sequence and returns the maximum <see cref="T:System.Int64" /> value.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values to determine the maximum value of.</param>
/// <param name="selector">A transform function to apply to each element.</param>
- /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Decimal" /> that corresponds to the maximum value in the source sequence.</returns>
+ /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Int64" /> that corresponds to the maximum value in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<decimal> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, decimal>> selector)
+ public static IQbservable<long> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, long>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<decimal>(
+ return source.Provider.CreateQuery<long>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, decimal>>))),
+ InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, long>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -8663,27 +9019,27 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Invokes a transform function on each element of a sequence and returns the maximum <see cref="T:System.Int32" /> value.
+ /// Invokes a transform function on each element of a sequence and returns the maximum nullable <see cref="T:System.Double" /> value.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values to determine the maximum value of.</param>
/// <param name="selector">A transform function to apply to each element.</param>
- /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Int32" /> that corresponds to the maximum value in the source sequence.</returns>
+ /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Nullable&lt;System.Double&gt;" /> that corresponds to the maximum value in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<int> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, int>> selector)
+ public static IQbservable<double?> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, double?>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<int>(
+ return source.Provider.CreateQuery<double?>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, int>>))),
+ InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, double?>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -8694,27 +9050,27 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Invokes a transform function on each element of a sequence and returns the maximum <see cref="T:System.Int64" /> value.
+ /// Invokes a transform function on each element of a sequence and returns the maximum nullable <see cref="T:System.Single" /> value.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values to determine the maximum value of.</param>
/// <param name="selector">A transform function to apply to each element.</param>
- /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Int64" /> that corresponds to the maximum value in the source sequence.</returns>
+ /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Nullable&lt;System.Single&gt;" /> that corresponds to the maximum value in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<long> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, long>> selector)
+ public static IQbservable<float?> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, float?>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<long>(
+ return source.Provider.CreateQuery<float?>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, long>>))),
+ InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, float?>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -8725,27 +9081,27 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Invokes a transform function on each element of a sequence and returns the maximum nullable <see cref="T:System.Double" /> value.
+ /// Invokes a transform function on each element of a sequence and returns the maximum nullable <see cref="T:System.Decimal" /> value.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values to determine the maximum value of.</param>
/// <param name="selector">A transform function to apply to each element.</param>
- /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Nullable&lt;System.Double&gt;" /> that corresponds to the maximum value in the source sequence.</returns>
+ /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Nullable&lt;System.Decimal&gt;" /> that corresponds to the maximum value in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<double?> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, double?>> selector)
+ public static IQbservable<decimal?> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, decimal?>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<double?>(
+ return source.Provider.CreateQuery<decimal?>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, double?>>))),
+ InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, decimal?>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -8756,27 +9112,27 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Invokes a transform function on each element of a sequence and returns the maximum nullable <see cref="T:System.Single" /> value.
+ /// Invokes a transform function on each element of a sequence and returns the maximum nullable <see cref="T:System.Int32" /> value.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values to determine the maximum value of.</param>
/// <param name="selector">A transform function to apply to each element.</param>
- /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Nullable&lt;System.Single&gt;" /> that corresponds to the maximum value in the source sequence.</returns>
+ /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Nullable&lt;System.Int32&gt;" /> that corresponds to the maximum value in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<float?> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, float?>> selector)
+ public static IQbservable<int?> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, int?>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<float?>(
+ return source.Provider.CreateQuery<int?>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, float?>>))),
+ InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, int?>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -8787,27 +9143,27 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Invokes a transform function on each element of a sequence and returns the maximum nullable <see cref="T:System.Decimal" /> value.
+ /// Invokes a transform function on each element of a sequence and returns the maximum nullable <see cref="T:System.Int64" /> value.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values to determine the maximum value of.</param>
/// <param name="selector">A transform function to apply to each element.</param>
- /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Nullable&lt;System.Decimal&gt;" /> that corresponds to the maximum value in the source sequence.</returns>
+ /// <returns>An observable sequence containing a single element with the value of type <see cref="T:System.Nullable&lt;System.Int64&gt;" /> that corresponds to the maximum value in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<decimal?> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, decimal?>> selector)
+ public static IQbservable<long?> Max<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, long?>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<decimal?>(
+ return source.Provider.CreateQuery<long?>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, decimal?>>))),
+ InfoOf(() => Qbservable.Max<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, long?>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -11431,10 +11787,10 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Projects each element of an observable sequence to an observable sequence, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one observable sequence.
+ /// Projects each element of an observable sequence to an enumerable sequence, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one observable sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
- /// <typeparam name="TCollection">The type of the elements in the projected intermediate sequences.</typeparam>
+ /// <typeparam name="TCollection">The type of the elements in the projected intermediate enumerable sequences.</typeparam>
/// <typeparam name="TResult">The type of the elements in the result sequence, obtained by using the selector to combine source sequence elements with their corresponding intermediate sequence elements.</typeparam>
/// <param name="source">An observable sequence of elements to project.</param>
/// <param name="collectionSelector">A transform function to apply to each element.</param>
@@ -11442,7 +11798,8 @@ namespace System.Reactive.Linq
/// <returns>An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="collectionSelector" /> or <paramref name="resultSelector" /> is null.</exception>
- public static IQbservable<TResult> SelectMany<TSource, TCollection, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, IObservable<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector)
+ /// <remarks>The projected sequences are enumerated synchonously within the OnNext call of the source sequence. In order to do a concurrent, non-blocking merge, change the selector to return an observable sequence obtained using the <see cref="M:System.Reactive.Linq.Observable.ToObservable``1(System.Collections.Generic.IEnumerable{``0})" /> conversion.</remarks>
+ public static IQbservable<TResult> SelectMany<TSource, TCollection, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, IEnumerable<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector)
{
if (source == null)
throw new ArgumentNullException("source");
@@ -11455,7 +11812,7 @@ namespace System.Reactive.Linq
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.SelectMany<TSource, TCollection, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, IObservable<TCollection>>>), default(Expression<Func<TSource, TCollection, TResult>>))),
+ InfoOf(() => Qbservable.SelectMany<TSource, TCollection, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, IEnumerable<TCollection>>>), default(Expression<Func<TSource, TCollection, TResult>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)),
#endif
@@ -11467,18 +11824,19 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Projects each element of an observable sequence to an observable sequence, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one observable sequence.
+ /// Projects each element of an observable sequence to an enumerable sequence by incorporating the element's index, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one observable sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
- /// <typeparam name="TCollection">The type of the elements in the projected intermediate sequences.</typeparam>
+ /// <typeparam name="TCollection">The type of the elements in the projected intermediate enumerable sequences.</typeparam>
/// <typeparam name="TResult">The type of the elements in the result sequence, obtained by using the selector to combine source sequence elements with their corresponding intermediate sequence elements.</typeparam>
/// <param name="source">An observable sequence of elements to project.</param>
- /// <param name="collectionSelector">A transform function to apply to each source element; the second parameter of the function represents the index of the source element.</param>
- /// <param name="resultSelector">A transform function to apply to each element of the intermediate sequence.</param>
+ /// <param name="collectionSelector">A transform function to apply to each element; the second parameter of the function represents the index of the source element.</param>
+ /// <param name="resultSelector">A transform function to apply to each element of the intermediate sequence; the second parameter of the function represents the index of the source element and the fourth parameter represents the index of the intermediate element.</param>
/// <returns>An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="collectionSelector" /> or <paramref name="resultSelector" /> is null.</exception>
- public static IQbservable<TResult> SelectMany<TSource, TCollection, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, int, IObservable<TCollection>>> collectionSelector, Expression<Func<TSource, int, TCollection, int, TResult>> resultSelector)
+ /// <remarks>The projected sequences are enumerated synchonously within the OnNext call of the source sequence. In order to do a concurrent, non-blocking merge, change the selector to return an observable sequence obtained using the <see cref="M:System.Reactive.Linq.Observable.ToObservable``1(System.Collections.Generic.IEnumerable{``0})" /> conversion.</remarks>
+ public static IQbservable<TResult> SelectMany<TSource, TCollection, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, int, IEnumerable<TCollection>>> collectionSelector, Expression<Func<TSource, int, TCollection, int, TResult>> resultSelector)
{
if (source == null)
throw new ArgumentNullException("source");
@@ -11491,7 +11849,7 @@ namespace System.Reactive.Linq
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.SelectMany<TSource, TCollection, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, int, IObservable<TCollection>>>), default(Expression<Func<TSource, int, TCollection, int, TResult>>))),
+ InfoOf(() => Qbservable.SelectMany<TSource, TCollection, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, int, IEnumerable<TCollection>>>), default(Expression<Func<TSource, int, TCollection, int, TResult>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)),
#endif
@@ -11503,10 +11861,10 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Projects each element of an observable sequence to an enumerable sequence, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one observable sequence.
+ /// Projects each element of an observable sequence to an observable sequence, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one observable sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
- /// <typeparam name="TCollection">The type of the elements in the projected intermediate enumerable sequences.</typeparam>
+ /// <typeparam name="TCollection">The type of the elements in the projected intermediate sequences.</typeparam>
/// <typeparam name="TResult">The type of the elements in the result sequence, obtained by using the selector to combine source sequence elements with their corresponding intermediate sequence elements.</typeparam>
/// <param name="source">An observable sequence of elements to project.</param>
/// <param name="collectionSelector">A transform function to apply to each element.</param>
@@ -11514,8 +11872,7 @@ namespace System.Reactive.Linq
/// <returns>An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="collectionSelector" /> or <paramref name="resultSelector" /> is null.</exception>
- /// <remarks>The projected sequences are enumerated synchonously within the OnNext call of the source sequence. In order to do a concurrent, non-blocking merge, change the selector to return an observable sequence obtained using the <see cref="M:System.Reactive.Linq.Observable.ToObservable``1(System.Collections.Generic.IEnumerable{``0})" /> conversion.</remarks>
- public static IQbservable<TResult> SelectMany<TSource, TCollection, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, IEnumerable<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector)
+ public static IQbservable<TResult> SelectMany<TSource, TCollection, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, IObservable<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector)
{
if (source == null)
throw new ArgumentNullException("source");
@@ -11528,7 +11885,7 @@ namespace System.Reactive.Linq
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.SelectMany<TSource, TCollection, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, IEnumerable<TCollection>>>), default(Expression<Func<TSource, TCollection, TResult>>))),
+ InfoOf(() => Qbservable.SelectMany<TSource, TCollection, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, IObservable<TCollection>>>), default(Expression<Func<TSource, TCollection, TResult>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)),
#endif
@@ -11540,19 +11897,18 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Projects each element of an observable sequence to an enumerable sequence, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one observable sequence.
+ /// Projects each element of an observable sequence to an observable sequence by incorporating the element's index, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one observable sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
- /// <typeparam name="TCollection">The type of the elements in the projected intermediate enumerable sequences.</typeparam>
+ /// <typeparam name="TCollection">The type of the elements in the projected intermediate sequences.</typeparam>
/// <typeparam name="TResult">The type of the elements in the result sequence, obtained by using the selector to combine source sequence elements with their corresponding intermediate sequence elements.</typeparam>
/// <param name="source">An observable sequence of elements to project.</param>
/// <param name="collectionSelector">A transform function to apply to each element; the second parameter of the function represents the index of the source element.</param>
- /// <param name="resultSelector">A transform function to apply to each element of the intermediate sequence.</param>
+ /// <param name="resultSelector">A transform function to apply to each element of the intermediate sequence; the second parameter of the function represents the index of the source element and the fourth parameter represents the index of the intermediate element.</param>
/// <returns>An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="collectionSelector" /> or <paramref name="resultSelector" /> is null.</exception>
- /// <remarks>The projected sequences are enumerated synchonously within the OnNext call of the source sequence. In order to do a concurrent, non-blocking merge, change the selector to return an observable sequence obtained using the <see cref="M:System.Reactive.Linq.Observable.ToObservable``1(System.Collections.Generic.IEnumerable{``0})" /> conversion.</remarks>
- public static IQbservable<TResult> SelectMany<TSource, TCollection, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, int, IEnumerable<TCollection>>> collectionSelector, Expression<Func<TSource, int, TCollection, int, TResult>> resultSelector)
+ public static IQbservable<TResult> SelectMany<TSource, TCollection, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, int, IObservable<TCollection>>> collectionSelector, Expression<Func<TSource, int, TCollection, int, TResult>> resultSelector)
{
if (source == null)
throw new ArgumentNullException("source");
@@ -11565,7 +11921,7 @@ namespace System.Reactive.Linq
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.SelectMany<TSource, TCollection, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, int, IEnumerable<TCollection>>>), default(Expression<Func<TSource, int, TCollection, int, TResult>>))),
+ InfoOf(() => Qbservable.SelectMany<TSource, TCollection, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, int, IObservable<TCollection>>>), default(Expression<Func<TSource, int, TCollection, int, TResult>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)),
#endif
@@ -11647,18 +12003,18 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Projects each notification of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
+ /// Projects each notification of an observable sequence to an observable sequence by incorporating the element's index and merges the resulting observable sequences into one observable sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <typeparam name="TResult">The type of the elements in the projected inner sequences and the elements in the merged result sequence.</typeparam>
/// <param name="source">An observable sequence of notifications to project.</param>
- /// <param name="onNext">A transform function to apply to each element; the second parameter represents the index of the source element.</param>
- /// <param name="onError">A transform function to apply when an error occurs in the source sequence; the second parameter represents the index of the source element.</param>
- /// <param name="onCompleted">A transform function to apply when the end of the source sequence is reached; the second parameter represents the number of elements observed.</param>
+ /// <param name="onNext">A transform function to apply to each element; the second parameter of the function represents the index of the source element.</param>
+ /// <param name="onError">A transform function to apply when an error occurs in the source sequence.</param>
+ /// <param name="onCompleted">A transform function to apply when the end of the source sequence is reached.</param>
/// <returns>An observable sequence whose elements are the result of invoking the one-to-many transform function corresponding to each notification in the input sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="onNext" /> or <paramref name="onError" /> or <paramref name="onCompleted" /> is null.</exception>
- public static IQbservable<TResult> SelectMany<TSource, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, int, IObservable<TResult>>> onNext, Expression<Func<Exception, int, IObservable<TResult>>> onError, Expression<Func<int, IObservable<TResult>>> onCompleted)
+ public static IQbservable<TResult> SelectMany<TSource, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, int, IObservable<TResult>>> onNext, Expression<Func<Exception, IObservable<TResult>>> onError, Expression<Func<IObservable<TResult>>> onCompleted)
{
if (source == null)
throw new ArgumentNullException("source");
@@ -11673,7 +12029,7 @@ namespace System.Reactive.Linq
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.SelectMany<TSource, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, int, IObservable<TResult>>>), default(Expression<Func<Exception, int, IObservable<TResult>>>), default(Expression<Func<int, IObservable<TResult>>>))),
+ InfoOf(() => Qbservable.SelectMany<TSource, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, int, IObservable<TResult>>>), default(Expression<Func<Exception, IObservable<TResult>>>), default(Expression<Func<IObservable<TResult>>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)),
#endif
@@ -11686,6 +12042,70 @@ namespace System.Reactive.Linq
}
/// <summary>
+ /// Projects each element of an observable sequence to an enumerable sequence and concatenates the resulting enumerable sequences into one observable sequence.
+ /// </summary>
+ /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
+ /// <typeparam name="TResult">The type of the elements in the projected inner enumerable sequences and the elements in the merged result sequence.</typeparam>
+ /// <param name="source">An observable sequence of elements to project.</param>
+ /// <param name="selector">A transform function to apply to each element.</param>
+ /// <returns>An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.</returns>
+ /// <exception cref="T:System.ArgumentNullException">
+ /// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
+ /// <remarks>The projected sequences are enumerated synchonously within the OnNext call of the source sequence. In order to do a concurrent, non-blocking merge, change the selector to return an observable sequence obtained using the <see cref="M:System.Reactive.Linq.Observable.ToObservable``1(System.Collections.Generic.IEnumerable{``0})" /> conversion.</remarks>
+ public static IQbservable<TResult> SelectMany<TSource, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, IEnumerable<TResult>>> selector)
+ {
+ if (source == null)
+ throw new ArgumentNullException("source");
+ if (selector == null)
+ throw new ArgumentNullException("selector");
+
+ return source.Provider.CreateQuery<TResult>(
+ Expression.Call(
+ null,
+#if CRIPPLED_REFLECTION
+ InfoOf(() => Qbservable.SelectMany<TSource, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, IEnumerable<TResult>>>))),
+#else
+ ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)),
+#endif
+ source.Expression,
+ selector
+ )
+ );
+ }
+
+ /// <summary>
+ /// Projects each element of an observable sequence to an enumerable sequence by incorporating the element's index and concatenates the resulting enumerable sequences into one observable sequence.
+ /// </summary>
+ /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
+ /// <typeparam name="TResult">The type of the elements in the projected inner enumerable sequences and the elements in the merged result sequence.</typeparam>
+ /// <param name="source">An observable sequence of elements to project.</param>
+ /// <param name="selector">A transform function to apply to each element; the second parameter of the function represents the index of the source element.</param>
+ /// <returns>An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.</returns>
+ /// <exception cref="T:System.ArgumentNullException">
+ /// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
+ /// <remarks>The projected sequences are enumerated synchonously within the OnNext call of the source sequence. In order to do a concurrent, non-blocking merge, change the selector to return an observable sequence obtained using the <see cref="M:System.Reactive.Linq.Observable.ToObservable``1(System.Collections.Generic.IEnumerable{``0})" /> conversion.</remarks>
+ public static IQbservable<TResult> SelectMany<TSource, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, int, IEnumerable<TResult>>> selector)
+ {
+ if (source == null)
+ throw new ArgumentNullException("source");
+ if (selector == null)
+ throw new ArgumentNullException("selector");
+
+ return source.Provider.CreateQuery<TResult>(
+ Expression.Call(
+ null,
+#if CRIPPLED_REFLECTION
+ InfoOf(() => Qbservable.SelectMany<TSource, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, int, IEnumerable<TResult>>>))),
+#else
+ ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)),
+#endif
+ source.Expression,
+ selector
+ )
+ );
+ }
+
+ /// <summary>
/// Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
@@ -11717,12 +12137,12 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
+ /// Projects each element of an observable sequence to an observable sequence by incorporating the element's index and merges the resulting observable sequences into one observable sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <typeparam name="TResult">The type of the elements in the projected inner sequences and the elements in the merged result sequence.</typeparam>
/// <param name="source">An observable sequence of elements to project.</param>
- /// <param name="selector">A transform function to apply to each source element; the second parameter of the function represents the index of the source element.</param>
+ /// <param name="selector">A transform function to apply to each element; the second parameter of the function represents the index of the source element.</param>
/// <returns>An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
@@ -11783,17 +12203,17 @@ namespace System.Reactive.Linq
#if !NO_TPL
/// <summary>
- /// Projects each element of an observable sequence to a task with cancellation support and merges all of the task results into one observable sequence.
+ /// Projects each element of an observable sequence to a task by incorporating the element's index and merges all of the task results into one observable sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <typeparam name="TResult">The type of the result produced by the projected tasks and the elements in the merged result sequence.</typeparam>
/// <param name="source">An observable sequence of elements to project.</param>
- /// <param name="selector">A transform function to apply to each element.</param>
+ /// <param name="selector">A transform function to apply to each element; the second parameter of the function represents the index of the source element.</param>
/// <returns>An observable sequence whose elements are the result of the tasks executed for each element of the input sequence.</returns>
/// <remarks>This overload supports composition of observable sequences and tasks, without requiring manual conversion of the tasks to observable sequences using <see cref="M:System.Reactive.Threading.Tasks.TaskObservableExtensions.ToObservable``1(System.Threading.Tasks.Task{``0})" />.</remarks>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
- public static IQbservable<TResult> SelectMany<TSource, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, CancellationToken, Task<TResult>>> selector)
+ public static IQbservable<TResult> SelectMany<TSource, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, int, Task<TResult>>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
@@ -11804,7 +12224,7 @@ namespace System.Reactive.Linq
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.SelectMany<TSource, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, CancellationToken, Task<TResult>>>))),
+ InfoOf(() => Qbservable.SelectMany<TSource, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, int, Task<TResult>>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)),
#endif
@@ -11815,18 +12235,19 @@ namespace System.Reactive.Linq
}
#endif
+#if !NO_TPL
/// <summary>
- /// Projects each element of an observable sequence to an enumerable sequence and concatenates the resulting enumerable sequences into one observable sequence.
+ /// Projects each element of an observable sequence to a task with cancellation support and merges all of the task results into one observable sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the projected inner enumerable sequences and the elements in the merged result sequence.</typeparam>
+ /// <typeparam name="TResult">The type of the result produced by the projected tasks and the elements in the merged result sequence.</typeparam>
/// <param name="source">An observable sequence of elements to project.</param>
/// <param name="selector">A transform function to apply to each element.</param>
- /// <returns>An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.</returns>
+ /// <returns>An observable sequence whose elements are the result of the tasks executed for each element of the input sequence.</returns>
+ /// <remarks>This overload supports composition of observable sequences and tasks, without requiring manual conversion of the tasks to observable sequences using <see cref="M:System.Reactive.Threading.Tasks.TaskObservableExtensions.ToObservable``1(System.Threading.Tasks.Task{``0})" />.</remarks>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
- /// <remarks>The projected sequences are enumerated synchonously within the OnNext call of the source sequence. In order to do a concurrent, non-blocking merge, change the selector to return an observable sequence obtained using the <see cref="M:System.Reactive.Linq.Observable.ToObservable``1(System.Collections.Generic.IEnumerable{``0})" /> conversion.</remarks>
- public static IQbservable<TResult> SelectMany<TSource, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, IEnumerable<TResult>>> selector)
+ public static IQbservable<TResult> SelectMany<TSource, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, CancellationToken, Task<TResult>>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
@@ -11837,7 +12258,7 @@ namespace System.Reactive.Linq
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.SelectMany<TSource, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, IEnumerable<TResult>>>))),
+ InfoOf(() => Qbservable.SelectMany<TSource, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, CancellationToken, Task<TResult>>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)),
#endif
@@ -11846,20 +12267,21 @@ namespace System.Reactive.Linq
)
);
}
+#endif
+#if !NO_TPL
/// <summary>
- /// Projects each element of an observable sequence to an enumerable sequence and concatenates the resulting enumerable sequences into one observable sequence.
- /// The index of each source element is used in the projected form of that element.
+ /// Projects each element of an observable sequence to a task by incorporating the element's index with cancellation support and merges all of the task results into one observable sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the projected inner enumerable sequences and the elements in the merged result sequence.</typeparam>
+ /// <typeparam name="TResult">The type of the result produced by the projected tasks and the elements in the merged result sequence.</typeparam>
/// <param name="source">An observable sequence of elements to project.</param>
- /// <param name="selector">A transform function to apply to each source element; the second parameter of the function represents the index of the source element.</param>
- /// <returns>An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.</returns>
+ /// <param name="selector">A transform function to apply to each element; the second parameter of the function represents the index of the source element.</param>
+ /// <returns>An observable sequence whose elements are the result of the tasks executed for each element of the input sequence.</returns>
+ /// <remarks>This overload supports composition of observable sequences and tasks, without requiring manual conversion of the tasks to observable sequences using <see cref="M:System.Reactive.Threading.Tasks.TaskObservableExtensions.ToObservable``1(System.Threading.Tasks.Task{``0})" />.</remarks>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
- /// <remarks>The projected sequences are enumerated synchonously within the OnNext call of the source sequence. In order to do a concurrent, non-blocking merge, change the selector to return an observable sequence obtained using the <see cref="M:System.Reactive.Linq.Observable.ToObservable``1(System.Collections.Generic.IEnumerable{``0})" /> conversion.</remarks>
- public static IQbservable<TResult> SelectMany<TSource, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, int, IEnumerable<TResult>>> selector)
+ public static IQbservable<TResult> SelectMany<TSource, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, int, CancellationToken, Task<TResult>>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
@@ -11870,7 +12292,7 @@ namespace System.Reactive.Linq
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.SelectMany<TSource, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, int, IEnumerable<TResult>>>))),
+ InfoOf(() => Qbservable.SelectMany<TSource, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, int, CancellationToken, Task<TResult>>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)),
#endif
@@ -11879,6 +12301,85 @@ namespace System.Reactive.Linq
)
);
}
+#endif
+
+#if !NO_TPL
+ /// <summary>
+ /// Projects each element of an observable sequence to a task with cancellation support, invokes the result selector for the source element and the task result, and merges the results into one observable sequence.
+ /// </summary>
+ /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
+ /// <typeparam name="TTaskResult">The type of the results produced by the projected intermediate tasks.</typeparam>
+ /// <typeparam name="TResult">The type of the elements in the result sequence, obtained by using the selector to combine source sequence elements with their corresponding intermediate task results.</typeparam>
+ /// <param name="source">An observable sequence of elements to project.</param>
+ /// <param name="taskSelector">A transform function to apply to each element.</param>
+ /// <param name="resultSelector">A transform function to apply to each element of the intermediate sequence.</param>
+ /// <returns>An observable sequence whose elements are the result of obtaining a task for each element of the input sequence and then mapping the task's result and its corresponding source element to a result element.</returns>
+ /// <exception cref="T:System.ArgumentNullException">
+ /// <paramref name="source" /> or <paramref name="taskSelector" /> or <paramref name="resultSelector" /> is null.</exception>
+ /// <remarks>This overload supports using LINQ query comprehension syntax in C# and Visual Basic to compose observable sequences and tasks, without requiring manual conversion of the tasks to observable sequences using <see cref="M:System.Reactive.Threading.Tasks.TaskObservableExtensions.ToObservable``1(System.Threading.Tasks.Task{``0})" />.</remarks>
+ public static IQbservable<TResult> SelectMany<TSource, TTaskResult, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, CancellationToken, Task<TTaskResult>>> taskSelector, Expression<Func<TSource, TTaskResult, TResult>> resultSelector)
+ {
+ if (source == null)
+ throw new ArgumentNullException("source");
+ if (taskSelector == null)
+ throw new ArgumentNullException("taskSelector");
+ if (resultSelector == null)
+ throw new ArgumentNullException("resultSelector");
+
+ return source.Provider.CreateQuery<TResult>(
+ Expression.Call(
+ null,
+#if CRIPPLED_REFLECTION
+ InfoOf(() => Qbservable.SelectMany<TSource, TTaskResult, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, CancellationToken, Task<TTaskResult>>>), default(Expression<Func<TSource, TTaskResult, TResult>>))),
+#else
+ ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TTaskResult), typeof(TResult)),
+#endif
+ source.Expression,
+ taskSelector,
+ resultSelector
+ )
+ );
+ }
+#endif
+
+#if !NO_TPL
+ /// <summary>
+ /// Projects each element of an observable sequence to a task by incorporating the element's index with cancellation support, invokes the result selector for the source element and the task result, and merges the results into one observable sequence.
+ /// </summary>
+ /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
+ /// <typeparam name="TTaskResult">The type of the results produced by the projected intermediate tasks.</typeparam>
+ /// <typeparam name="TResult">The type of the elements in the result sequence, obtained by using the selector to combine source sequence elements with their corresponding intermediate task results.</typeparam>
+ /// <param name="source">An observable sequence of elements to project.</param>
+ /// <param name="taskSelector">A transform function to apply to each element; the second parameter of the function represents the index of the source element.</param>
+ /// <param name="resultSelector">A transform function to apply to each element of the intermediate sequence; the second parameter of the function represents the index of the source element.</param>
+ /// <returns>An observable sequence whose elements are the result of obtaining a task for each element of the input sequence and then mapping the task's result and its corresponding source element to a result element.</returns>
+ /// <exception cref="T:System.ArgumentNullException">
+ /// <paramref name="source" /> or <paramref name="taskSelector" /> or <paramref name="resultSelector" /> is null.</exception>
+ /// <remarks>This overload supports using LINQ query comprehension syntax in C# and Visual Basic to compose observable sequences and tasks, without requiring manual conversion of the tasks to observable sequences using <see cref="M:System.Reactive.Threading.Tasks.TaskObservableExtensions.ToObservable``1(System.Threading.Tasks.Task{``0})" />.</remarks>
+ public static IQbservable<TResult> SelectMany<TSource, TTaskResult, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, int, CancellationToken, Task<TTaskResult>>> taskSelector, Expression<Func<TSource, int, TTaskResult, TResult>> resultSelector)
+ {
+ if (source == null)
+ throw new ArgumentNullException("source");
+ if (taskSelector == null)
+ throw new ArgumentNullException("taskSelector");
+ if (resultSelector == null)
+ throw new ArgumentNullException("resultSelector");
+
+ return source.Provider.CreateQuery<TResult>(
+ Expression.Call(
+ null,
+#if CRIPPLED_REFLECTION
+ InfoOf(() => Qbservable.SelectMany<TSource, TTaskResult, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, int, CancellationToken, Task<TTaskResult>>>), default(Expression<Func<TSource, int, TTaskResult, TResult>>))),
+#else
+ ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TTaskResult), typeof(TResult)),
+#endif
+ source.Expression,
+ taskSelector,
+ resultSelector
+ )
+ );
+ }
+#endif
#if !NO_TPL
/// <summary>
@@ -11921,19 +12422,19 @@ namespace System.Reactive.Linq
#if !NO_TPL
/// <summary>
- /// Projects each element of an observable sequence to a task with cancellation support, invokes the result selector for the source element and the task result, and merges the results into one observable sequence.
+ /// Projects each element of an observable sequence to a task by incorporating the element's index, invokes the result selector for the source element and the task result, and merges the results into one observable sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <typeparam name="TTaskResult">The type of the results produced by the projected intermediate tasks.</typeparam>
/// <typeparam name="TResult">The type of the elements in the result sequence, obtained by using the selector to combine source sequence elements with their corresponding intermediate task results.</typeparam>
/// <param name="source">An observable sequence of elements to project.</param>
- /// <param name="taskSelector">A transform function to apply to each element.</param>
- /// <param name="resultSelector">A transform function to apply to each element of the intermediate sequence.</param>
+ /// <param name="taskSelector">A transform function to apply to each element; the second parameter of the function represents the index of the source element.</param>
+ /// <param name="resultSelector">A transform function to apply to each element of the intermediate sequence; the second parameter of the function represents the index of the source element.</param>
/// <returns>An observable sequence whose elements are the result of obtaining a task for each element of the input sequence and then mapping the task's result and its corresponding source element to a result element.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="taskSelector" /> or <paramref name="resultSelector" /> is null.</exception>
/// <remarks>This overload supports using LINQ query comprehension syntax in C# and Visual Basic to compose observable sequences and tasks, without requiring manual conversion of the tasks to observable sequences using <see cref="M:System.Reactive.Threading.Tasks.TaskObservableExtensions.ToObservable``1(System.Threading.Tasks.Task{``0})" />.</remarks>
- public static IQbservable<TResult> SelectMany<TSource, TTaskResult, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, CancellationToken, Task<TTaskResult>>> taskSelector, Expression<Func<TSource, TTaskResult, TResult>> resultSelector)
+ public static IQbservable<TResult> SelectMany<TSource, TTaskResult, TResult>(this IQbservable<TSource> source, Expression<Func<TSource, int, Task<TTaskResult>>> taskSelector, Expression<Func<TSource, int, TTaskResult, TResult>> resultSelector)
{
if (source == null)
throw new ArgumentNullException("source");
@@ -11946,7 +12447,7 @@ namespace System.Reactive.Linq
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.SelectMany<TSource, TTaskResult, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, CancellationToken, Task<TTaskResult>>>), default(Expression<Func<TSource, TTaskResult, TResult>>))),
+ InfoOf(() => Qbservable.SelectMany<TSource, TTaskResult, TResult>(default(IQbservable<TSource>), default(Expression<Func<TSource, int, Task<TTaskResult>>>), default(Expression<Func<TSource, int, TTaskResult, TResult>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TTaskResult), typeof(TResult)),
#endif
@@ -13403,7 +13904,7 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Computes the sum of a sequence of <see cref="T:System.Double" /> values that are obtained by invoking a transform function on each element of the input sequence.
+ /// Computes the sum of a sequence of nullable <see cref="T:System.Int32" /> values that are obtained by invoking a transform function on each element of the input sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values that are used to calculate a sum.</param>
@@ -13411,19 +13912,20 @@ namespace System.Reactive.Linq
/// <returns>An observable sequence containing a single element with the sum of the values in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
+ /// <exception cref="T:System.OverflowException">(Asynchronous) The sum of the projected values for the elements in the source sequence is larger than <see cref="M:System.Int32.MaxValue" />.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<double> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, double>> selector)
+ public static IQbservable<int?> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, int?>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<double>(
+ return source.Provider.CreateQuery<int?>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, double>>))),
+ InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, int?>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -13434,7 +13936,7 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Computes the sum of a sequence of <see cref="T:System.Single" /> values that are obtained by invoking a transform function on each element of the input sequence.
+ /// Computes the sum of a sequence of nullable <see cref="T:System.Int64" /> values that are obtained by invoking a transform function on each element of the input sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values that are used to calculate a sum.</param>
@@ -13442,19 +13944,20 @@ namespace System.Reactive.Linq
/// <returns>An observable sequence containing a single element with the sum of the values in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
+ /// <exception cref="T:System.OverflowException">(Asynchronous) The sum of the projected values for the elements in the source sequence is larger than <see cref="M:System.Int64.MaxValue" />.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<float> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, float>> selector)
+ public static IQbservable<long?> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, long?>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<float>(
+ return source.Provider.CreateQuery<long?>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, float>>))),
+ InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, long?>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -13465,7 +13968,7 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Computes the sum of a sequence of <see cref="T:System.Decimal" /> values that are obtained by invoking a transform function on each element of the input sequence.
+ /// Computes the sum of a sequence of <see cref="T:System.Double" /> values that are obtained by invoking a transform function on each element of the input sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values that are used to calculate a sum.</param>
@@ -13473,20 +13976,19 @@ namespace System.Reactive.Linq
/// <returns>An observable sequence containing a single element with the sum of the values in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
- /// <exception cref="T:System.OverflowException">(Asynchronous) The sum of the projected values for the elements in the source sequence is larger than <see cref="M:System.Decimal.MaxValue" />.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<decimal> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, decimal>> selector)
+ public static IQbservable<double> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, double>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<decimal>(
+ return source.Provider.CreateQuery<double>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, decimal>>))),
+ InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, double>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -13497,7 +13999,7 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Computes the sum of a sequence of <see cref="T:System.Int32" /> values that are obtained by invoking a transform function on each element of the input sequence.
+ /// Computes the sum of a sequence of <see cref="T:System.Single" /> values that are obtained by invoking a transform function on each element of the input sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values that are used to calculate a sum.</param>
@@ -13505,20 +14007,19 @@ namespace System.Reactive.Linq
/// <returns>An observable sequence containing a single element with the sum of the values in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
- /// <exception cref="T:System.OverflowException">(Asynchronous) The sum of the projected values for the elements in the source sequence is larger than <see cref="M:System.Int32.MaxValue" />.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<int> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, int>> selector)
+ public static IQbservable<float> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, float>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<int>(
+ return source.Provider.CreateQuery<float>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, int>>))),
+ InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, float>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -13529,7 +14030,7 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Computes the sum of a sequence of <see cref="T:System.Int64" /> values that are obtained by invoking a transform function on each element of the input sequence.
+ /// Computes the sum of a sequence of <see cref="T:System.Decimal" /> values that are obtained by invoking a transform function on each element of the input sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values that are used to calculate a sum.</param>
@@ -13537,20 +14038,20 @@ namespace System.Reactive.Linq
/// <returns>An observable sequence containing a single element with the sum of the values in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
- /// <exception cref="T:System.OverflowException">(Asynchronous) The sum of the projected values for the elements in the source sequence is larger than <see cref="M:System.Int64.MaxValue" />.</exception>
+ /// <exception cref="T:System.OverflowException">(Asynchronous) The sum of the projected values for the elements in the source sequence is larger than <see cref="M:System.Decimal.MaxValue" />.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<long> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, long>> selector)
+ public static IQbservable<decimal> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, decimal>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<long>(
+ return source.Provider.CreateQuery<decimal>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, long>>))),
+ InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, decimal>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -13561,7 +14062,7 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Computes the sum of a sequence of nullable <see cref="T:System.Double" /> values that are obtained by invoking a transform function on each element of the input sequence.
+ /// Computes the sum of a sequence of <see cref="T:System.Int32" /> values that are obtained by invoking a transform function on each element of the input sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values that are used to calculate a sum.</param>
@@ -13569,19 +14070,20 @@ namespace System.Reactive.Linq
/// <returns>An observable sequence containing a single element with the sum of the values in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
+ /// <exception cref="T:System.OverflowException">(Asynchronous) The sum of the projected values for the elements in the source sequence is larger than <see cref="M:System.Int32.MaxValue" />.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<double?> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, double?>> selector)
+ public static IQbservable<int> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, int>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<double?>(
+ return source.Provider.CreateQuery<int>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, double?>>))),
+ InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, int>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -13592,7 +14094,7 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Computes the sum of a sequence of nullable <see cref="T:System.Single" /> values that are obtained by invoking a transform function on each element of the input sequence.
+ /// Computes the sum of a sequence of <see cref="T:System.Int64" /> values that are obtained by invoking a transform function on each element of the input sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values that are used to calculate a sum.</param>
@@ -13600,19 +14102,20 @@ namespace System.Reactive.Linq
/// <returns>An observable sequence containing a single element with the sum of the values in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
+ /// <exception cref="T:System.OverflowException">(Asynchronous) The sum of the projected values for the elements in the source sequence is larger than <see cref="M:System.Int64.MaxValue" />.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<float?> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, float?>> selector)
+ public static IQbservable<long> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, long>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<float?>(
+ return source.Provider.CreateQuery<long>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, float?>>))),
+ InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, long>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -13623,7 +14126,7 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Computes the sum of a sequence of nullable <see cref="T:System.Decimal" /> values that are obtained by invoking a transform function on each element of the input sequence.
+ /// Computes the sum of a sequence of nullable <see cref="T:System.Double" /> values that are obtained by invoking a transform function on each element of the input sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values that are used to calculate a sum.</param>
@@ -13631,20 +14134,19 @@ namespace System.Reactive.Linq
/// <returns>An observable sequence containing a single element with the sum of the values in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
- /// <exception cref="T:System.OverflowException">(Asynchronous) The sum of the projected values for the elements in the source sequence is larger than <see cref="M:System.Decimal.MaxValue" />.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<decimal?> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, decimal?>> selector)
+ public static IQbservable<double?> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, double?>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<decimal?>(
+ return source.Provider.CreateQuery<double?>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, decimal?>>))),
+ InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, double?>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -13655,7 +14157,7 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Computes the sum of a sequence of nullable <see cref="T:System.Int32" /> values that are obtained by invoking a transform function on each element of the input sequence.
+ /// Computes the sum of a sequence of nullable <see cref="T:System.Single" /> values that are obtained by invoking a transform function on each element of the input sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values that are used to calculate a sum.</param>
@@ -13663,20 +14165,19 @@ namespace System.Reactive.Linq
/// <returns>An observable sequence containing a single element with the sum of the values in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
- /// <exception cref="T:System.OverflowException">(Asynchronous) The sum of the projected values for the elements in the source sequence is larger than <see cref="M:System.Int32.MaxValue" />.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<int?> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, int?>> selector)
+ public static IQbservable<float?> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, float?>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<int?>(
+ return source.Provider.CreateQuery<float?>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, int?>>))),
+ InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, float?>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -13687,7 +14188,7 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Computes the sum of a sequence of nullable <see cref="T:System.Int64" /> values that are obtained by invoking a transform function on each element of the input sequence.
+ /// Computes the sum of a sequence of nullable <see cref="T:System.Decimal" /> values that are obtained by invoking a transform function on each element of the input sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">A sequence of values that are used to calculate a sum.</param>
@@ -13695,20 +14196,20 @@ namespace System.Reactive.Linq
/// <returns>An observable sequence containing a single element with the sum of the values in the source sequence.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> or <paramref name="selector" /> is null.</exception>
- /// <exception cref="T:System.OverflowException">(Asynchronous) The sum of the projected values for the elements in the source sequence is larger than <see cref="M:System.Int64.MaxValue" />.</exception>
+ /// <exception cref="T:System.OverflowException">(Asynchronous) The sum of the projected values for the elements in the source sequence is larger than <see cref="M:System.Decimal.MaxValue" />.</exception>
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
- public static IQbservable<long?> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, long?>> selector)
+ public static IQbservable<decimal?> Sum<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, decimal?>> selector)
{
if (source == null)
throw new ArgumentNullException("source");
if (selector == null)
throw new ArgumentNullException("selector");
- return source.Provider.CreateQuery<long?>(
+ return source.Provider.CreateQuery<decimal?>(
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, long?>>))),
+ InfoOf(() => Qbservable.Sum<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, decimal?>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
#endif
@@ -13719,8 +14220,10 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Switches between the inner observable sequences such that the resulting sequence always produces elements from the most recently received inner observable sequence.
- /// Each time a new inner observable sequence is received, the previous inner observable sequence is unsubscribed from.
+ /// Transforms an observable sequence of observable sequences into an observable sequence
+ /// producing values only from the most recent observable sequence.
+ /// Each time a new inner observable sequence is received, unsubscribe from the
+ /// previous inner observable sequence.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
/// <param name="sources">Observable sequence of inner observable sequences.</param>
@@ -13747,7 +14250,8 @@ namespace System.Reactive.Linq
#if !NO_TPL
/// <summary>
- /// Switches between the tasks such that the resulting sequence always produces results from the most recently received task.
+ /// Transforms an observable sequence of tasks into an observable sequence
+ /// producing values only from the most recent observable sequence.
/// Each time a new task is received, the previous task's result is ignored.
/// </summary>
/// <typeparam name="TSource">The type of the results produced by the source tasks.</typeparam>
@@ -16640,18 +17144,18 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Merges two observable sequences into one observable sequence by combining their elements in a pairwise fashion.
+ /// Merges an observable sequence and an enumerable sequence into one observable sequence by using the selector function.
/// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
+ /// <typeparam name="TSource1">The type of the elements in the first observable source sequence.</typeparam>
+ /// <typeparam name="TSource2">The type of the elements in the second enumerable source sequence.</typeparam>
/// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
/// <param name="first">First observable source.</param>
- /// <param name="second">Second observable source.</param>
+ /// <param name="second">Second enumerable source.</param>
/// <param name="resultSelector">Function to invoke for each consecutive pair of elements from the first and second source.</param>
/// <returns>An observable sequence containing the result of pairwise combining the elements of the first and second source using the specified result selector function.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="first" /> or <paramref name="second" /> or <paramref name="resultSelector" /> is null.</exception>
- public static IQbservable<TResult> Zip<TSource1, TSource2, TResult>(this IQbservable<TSource1> first, IObservable<TSource2> second, Expression<Func<TSource1, TSource2, TResult>> resultSelector)
+ public static IQbservable<TResult> Zip<TSource1, TSource2, TResult>(this IQbservable<TSource1> first, IEnumerable<TSource2> second, Expression<Func<TSource1, TSource2, TResult>> resultSelector)
{
if (first == null)
throw new ArgumentNullException("first");
@@ -16664,7 +17168,7 @@ namespace System.Reactive.Linq
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Zip<TSource1, TSource2, TResult>(default(IQbservable<TSource1>), default(IObservable<TSource2>), default(Expression<Func<TSource1, TSource2, TResult>>))),
+ InfoOf(() => Qbservable.Zip<TSource1, TSource2, TResult>(default(IQbservable<TSource1>), default(IEnumerable<TSource2>), default(Expression<Func<TSource1, TSource2, TResult>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource1), typeof(TSource2), typeof(TResult)),
#endif
@@ -16676,18 +17180,18 @@ namespace System.Reactive.Linq
}
/// <summary>
- /// Merges an observable sequence and an enumerable sequence into one observable sequence by using the selector function.
+ /// Merges two observable sequences into one observable sequence by combining their elements in a pairwise fashion.
/// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first observable source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second enumerable source sequence.</typeparam>
+ /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
+ /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
/// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
/// <param name="first">First observable source.</param>
- /// <param name="second">Second enumerable source.</param>
+ /// <param name="second">Second observable source.</param>
/// <param name="resultSelector">Function to invoke for each consecutive pair of elements from the first and second source.</param>
/// <returns>An observable sequence containing the result of pairwise combining the elements of the first and second source using the specified result selector function.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="first" /> or <paramref name="second" /> or <paramref name="resultSelector" /> is null.</exception>
- public static IQbservable<TResult> Zip<TSource1, TSource2, TResult>(this IQbservable<TSource1> first, IEnumerable<TSource2> second, Expression<Func<TSource1, TSource2, TResult>> resultSelector)
+ public static IQbservable<TResult> Zip<TSource1, TSource2, TResult>(this IQbservable<TSource1> first, IObservable<TSource2> second, Expression<Func<TSource1, TSource2, TResult>> resultSelector)
{
if (first == null)
throw new ArgumentNullException("first");
@@ -16700,7 +17204,7 @@ namespace System.Reactive.Linq
Expression.Call(
null,
#if CRIPPLED_REFLECTION
- InfoOf(() => Qbservable.Zip<TSource1, TSource2, TResult>(default(IQbservable<TSource1>), default(IEnumerable<TSource2>), default(Expression<Func<TSource1, TSource2, TResult>>))),
+ InfoOf(() => Qbservable.Zip<TSource1, TSource2, TResult>(default(IQbservable<TSource1>), default(IObservable<TSource2>), default(Expression<Func<TSource1, TSource2, TResult>>))),
#else
((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource1), typeof(TSource2), typeof(TResult)),
#endif