|
@@ -9,20 +9,73 @@ using System.Windows.Threading;
|
|
|
namespace System.Reactive.Linq
|
|
namespace System.Reactive.Linq
|
|
|
{
|
|
{
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Provides a set of extension methods for scheduling actions performed through observable sequences on UI dispatchers.
|
|
|
|
|
|
|
+ /// Obsolete. The <c>System.Reactive.Integration.Wpf</c> NuGet package defines a
|
|
|
|
|
+ /// <c>WpfDispatcherObservable</c> class that defines new extension methods to be used in
|
|
|
|
|
+ /// place of these (also in the <c>System.Reactive.Linq</c> namespace).
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
|
|
+ /// <remarks>
|
|
|
|
|
+ /// <para>
|
|
|
|
|
+ /// The replacement <c>WpfDispatcherObservable</c> class uses different names for extension
|
|
|
|
|
+ /// methods. When you migrate to that new class from this obsolete one, you will need to change
|
|
|
|
|
+ /// your code to invoke different method names:
|
|
|
|
|
+ /// </para>
|
|
|
|
|
+ /// <list type="table">
|
|
|
|
|
+ /// <listheader><term>Rx <= 6.0</term><term>Now</term></listheader>
|
|
|
|
|
+ /// <item>
|
|
|
|
|
+ /// <term><c>ObserveOn</c> (except for overload taking a <c>DispatcherScheduler</c></term>
|
|
|
|
|
+ /// <term><c>ObserveOnWpfDispatcher</c></term>
|
|
|
|
|
+ /// </item>
|
|
|
|
|
+ /// <item>
|
|
|
|
|
+ /// <term><c>ObserveOnDispatcher</c></term>
|
|
|
|
|
+ /// <term><c>ObserveOnCurrentWpfDispatcher</c></term>
|
|
|
|
|
+ /// </item>
|
|
|
|
|
+ /// <item>
|
|
|
|
|
+ /// <term><c>SubscribeOn</c> (except for overload taking a <c>DispatcherScheduler</c></term>
|
|
|
|
|
+ /// <term><c>SubscribeOnWpfDispatcher</c></term>
|
|
|
|
|
+ /// </item>
|
|
|
|
|
+ /// <item>
|
|
|
|
|
+ /// <term><c>SubscribeOnDispatcher</c></term>
|
|
|
|
|
+ /// <term><c>SubscribeOnCurrentWpfDispatcher</c></term>
|
|
|
|
|
+ /// </item>
|
|
|
|
|
+ /// </list>
|
|
|
|
|
+ /// <para>
|
|
|
|
|
+ /// The overloads accepting a <see cref="DispatcherScheduler"/> don't need to be renamed because
|
|
|
|
|
+ /// there is no scope for ambiguity: if you pass the non-obsolete <see cref="DispatcherScheduler"/>
|
|
|
|
|
+ /// defined in this package, you will get the corresponding non-obsolete overload. (Code using
|
|
|
|
|
+ /// the old obsolete <c>DispatcherScheduler</c> will get the old obsolete overload.)
|
|
|
|
|
+ /// </para>
|
|
|
|
|
+ /// <para>
|
|
|
|
|
+ /// This will eventually be removed because all UI-framework-specific functionality is being
|
|
|
|
|
+ /// removed from <c>System.Reactive</c>. This is necessary to fix problems in which
|
|
|
|
|
+ /// <c>System.Reactive</c> causes applications to end up with dependencies on Windows Forms and
|
|
|
|
|
+ /// WPF whether they want them or not.
|
|
|
|
|
+ /// </para>
|
|
|
|
|
+ /// <para>
|
|
|
|
|
+ /// Rx defines extension methods for <see cref="IObservable{T}"/> in either the
|
|
|
|
|
+ /// <c>System.Reactive.Linq</c> or <c>System</c> namespaces. This means the replacement for
|
|
|
|
|
+ /// this obsolete class has to use different names. We need to retain these old obsolete
|
|
|
|
|
+ /// extension methods for many years to provide code using Rx with time to adapt, which means
|
|
|
|
|
+ /// the new extension methods must coexist with these old obsolete ones. Extension methods
|
|
|
|
|
+ /// are awkward to fully qualify, making it easier for migrating code if the new methods have
|
|
|
|
|
+ /// visibly different names (and not the same names on a new type).
|
|
|
|
|
+ /// </para>
|
|
|
|
|
+ /// </remarks>
|
|
|
|
|
+ [Obsolete("Use the extension methods defined by the System.Reactive.Linq.WpfDispatcherObservable class in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static class DispatcherObservable
|
|
public static class DispatcherObservable
|
|
|
{
|
|
{
|
|
|
#region ObserveOn[Dispatcher]
|
|
#region ObserveOn[Dispatcher]
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Wraps the source sequence in order to run its observer callbacks on the specified dispatcher.
|
|
|
|
|
|
|
+ /// Obsolete. Use the <c>ObserveOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
+ /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
+ /// <c>System.Reactive.Integration.Wpf</c> package instead.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
|
/// <param name="source">Source sequence.</param>
|
|
/// <param name="source">Source sequence.</param>
|
|
|
/// <param name="dispatcher">Dispatcher whose associated message loop is used to notify observers on.</param>
|
|
/// <param name="dispatcher">Dispatcher whose associated message loop is used to notify observers on.</param>
|
|
|
/// <returns>The source sequence whose observations happen on the specified dispatcher.</returns>
|
|
/// <returns>The source sequence whose observations happen on the specified dispatcher.</returns>
|
|
|
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="dispatcher"/> is null.</exception>
|
|
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="dispatcher"/> is null.</exception>
|
|
|
|
|
+ [Obsolete("Use the ObserveOnWpfDispatcher extension method defined by System.Reactive.Linq.WpfDispatcherObservable in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, Dispatcher dispatcher)
|
|
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, Dispatcher dispatcher)
|
|
|
{
|
|
{
|
|
|
if (source == null)
|
|
if (source == null)
|
|
@@ -39,7 +92,9 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Wraps the source sequence in order to run its observer callbacks on the specified dispatcher.
|
|
|
|
|
|
|
+ /// Obsolete. Use the <c>ObserveOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
+ /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
+ /// <c>System.Reactive.Integration.Wpf</c> package instead.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
|
/// <param name="source">Source sequence.</param>
|
|
/// <param name="source">Source sequence.</param>
|
|
@@ -47,6 +102,7 @@ namespace System.Reactive.Linq
|
|
|
/// <param name="priority">Priority to schedule work items at.</param>
|
|
/// <param name="priority">Priority to schedule work items at.</param>
|
|
|
/// <returns>The source sequence whose observations happen on the specified dispatcher.</returns>
|
|
/// <returns>The source sequence whose observations happen on the specified dispatcher.</returns>
|
|
|
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="dispatcher"/> is null.</exception>
|
|
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="dispatcher"/> is null.</exception>
|
|
|
|
|
+ [Obsolete("Use the ObserveOnWpfDispatcher extension method defined by System.Reactive.Linq.WpfDispatcherObservable in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, Dispatcher dispatcher, DispatcherPriority priority)
|
|
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, Dispatcher dispatcher, DispatcherPriority priority)
|
|
|
{
|
|
{
|
|
|
if (source == null)
|
|
if (source == null)
|
|
@@ -63,13 +119,16 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Wraps the source sequence in order to run its observer callbacks on the specified dispatcher scheduler.
|
|
|
|
|
|
|
+ /// Obsolete. Use the <c>ObserveOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
+ /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
+ /// <c>System.Reactive.Integration.Wpf</c> package instead.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
|
/// <param name="source">Source sequence.</param>
|
|
/// <param name="source">Source sequence.</param>
|
|
|
/// <param name="scheduler">Dispatcher scheduler to notify observers on.</param>
|
|
/// <param name="scheduler">Dispatcher scheduler to notify observers on.</param>
|
|
|
/// <returns>The source sequence whose observations happen on the specified dispatcher scheduler.</returns>
|
|
/// <returns>The source sequence whose observations happen on the specified dispatcher scheduler.</returns>
|
|
|
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="scheduler"/> is null.</exception>
|
|
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="scheduler"/> is null.</exception>
|
|
|
|
|
+ [Obsolete("Use the ObserveOnWpfDispatcher extension method defined by System.Reactive.Linq.WpfDispatcherObservable in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherScheduler scheduler)
|
|
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherScheduler scheduler)
|
|
|
{
|
|
{
|
|
|
if (source == null)
|
|
if (source == null)
|
|
@@ -85,15 +144,17 @@ namespace System.Reactive.Linq
|
|
|
return ObserveOn_(source, scheduler.Dispatcher, scheduler.Priority);
|
|
return ObserveOn_(source, scheduler.Dispatcher, scheduler.Priority);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the specified object.
|
|
|
|
|
|
|
+ /// Obsolete. Use the <c>ObserveOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
+ /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
+ /// <c>System.Reactive.Integration.Wpf</c> package instead.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
|
/// <param name="source">Source sequence.</param>
|
|
/// <param name="source">Source sequence.</param>
|
|
|
/// <param name="dispatcherObject">Object to get the dispatcher from.</param>
|
|
/// <param name="dispatcherObject">Object to get the dispatcher from.</param>
|
|
|
/// <returns>The source sequence whose observations happen on the specified object's dispatcher.</returns>
|
|
/// <returns>The source sequence whose observations happen on the specified object's dispatcher.</returns>
|
|
|
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="dispatcherObject"/> is null.</exception>
|
|
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="dispatcherObject"/> is null.</exception>
|
|
|
|
|
+ [Obsolete("Use the ObserveOnWpfDispatcher extension method defined by System.Reactive.Linq.WpfDispatcherObservable in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherObject dispatcherObject)
|
|
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherObject dispatcherObject)
|
|
|
{
|
|
{
|
|
|
if (source == null)
|
|
if (source == null)
|
|
@@ -110,7 +171,9 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the specified object.
|
|
|
|
|
|
|
+ /// Obsolete. Use the <c>ObserveOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
+ /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
+ /// <c>System.Reactive.Integration.Wpf</c> package instead.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
|
/// <param name="source">Source sequence.</param>
|
|
/// <param name="source">Source sequence.</param>
|
|
@@ -118,6 +181,7 @@ namespace System.Reactive.Linq
|
|
|
/// <param name="priority">Priority to schedule work items at.</param>
|
|
/// <param name="priority">Priority to schedule work items at.</param>
|
|
|
/// <returns>The source sequence whose observations happen on the specified object's dispatcher.</returns>
|
|
/// <returns>The source sequence whose observations happen on the specified object's dispatcher.</returns>
|
|
|
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="dispatcherObject"/> is null.</exception>
|
|
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="dispatcherObject"/> is null.</exception>
|
|
|
|
|
+ [Obsolete("Use the ObserveOnWpfDispatcher extension method defined by System.Reactive.Linq.WpfDispatcherObservable in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherObject dispatcherObject, DispatcherPriority priority)
|
|
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherObject dispatcherObject, DispatcherPriority priority)
|
|
|
{
|
|
{
|
|
|
if (source == null)
|
|
if (source == null)
|
|
@@ -133,14 +197,16 @@ namespace System.Reactive.Linq
|
|
|
return ObserveOn_(source, dispatcherObject.Dispatcher, priority);
|
|
return ObserveOn_(source, dispatcherObject.Dispatcher, priority);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the current thread.
|
|
|
|
|
|
|
+ /// Obsolete. Use the <c>ObserveOnCurrentWpfDispatcher</c> extension method defined by
|
|
|
|
|
+ /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
+ /// <c>System.Reactive.Integration.Wpf</c> package instead.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
|
/// <param name="source">Source sequence.</param>
|
|
/// <param name="source">Source sequence.</param>
|
|
|
/// <returns>The source sequence whose observations happen on the current thread's dispatcher.</returns>
|
|
/// <returns>The source sequence whose observations happen on the current thread's dispatcher.</returns>
|
|
|
/// <exception cref="ArgumentNullException"><paramref name="source"/> is null.</exception>
|
|
/// <exception cref="ArgumentNullException"><paramref name="source"/> is null.</exception>
|
|
|
|
|
+ [Obsolete("Use the ObserveOnCurrentWpfDispatcher extension method defined by System.Reactive.Linq.WpfDispatcherObservable in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static IObservable<TSource> ObserveOnDispatcher<TSource>(this IObservable<TSource> source)
|
|
public static IObservable<TSource> ObserveOnDispatcher<TSource>(this IObservable<TSource> source)
|
|
|
{
|
|
{
|
|
|
if (source == null)
|
|
if (source == null)
|
|
@@ -152,13 +218,16 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the current thread.
|
|
|
|
|
|
|
+ /// Obsolete. Use the <c>ObserveOnCurrentWpfDispatcher</c> extension method defined by
|
|
|
|
|
+ /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
+ /// <c>System.Reactive.Integration.Wpf</c> package instead.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
|
/// <param name="source">Source sequence.</param>
|
|
/// <param name="source">Source sequence.</param>
|
|
|
/// <param name="priority">Priority to schedule work items at.</param>
|
|
/// <param name="priority">Priority to schedule work items at.</param>
|
|
|
/// <returns>The source sequence whose observations happen on the current thread's dispatcher.</returns>
|
|
/// <returns>The source sequence whose observations happen on the current thread's dispatcher.</returns>
|
|
|
/// <exception cref="ArgumentNullException"><paramref name="source"/> is null.</exception>
|
|
/// <exception cref="ArgumentNullException"><paramref name="source"/> is null.</exception>
|
|
|
|
|
+ [Obsolete("Use the ObserveOnCurrentWpfDispatcher extension method defined by System.Reactive.Linq.WpfDispatcherObservable in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static IObservable<TSource> ObserveOnDispatcher<TSource>(this IObservable<TSource> source, DispatcherPriority priority)
|
|
public static IObservable<TSource> ObserveOnDispatcher<TSource>(this IObservable<TSource> source, DispatcherPriority priority)
|
|
|
{
|
|
{
|
|
|
if (source == null)
|
|
if (source == null)
|
|
@@ -185,7 +254,9 @@ namespace System.Reactive.Linq
|
|
|
#region SubscribeOn[Dispatcher]
|
|
#region SubscribeOn[Dispatcher]
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Wraps the source sequence in order to run its subscription and unsubscription logic on the specified dispatcher.
|
|
|
|
|
|
|
+ /// Obsolete. Use the <c>SubscribeOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
+ /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
+ /// <c>System.Reactive.Integration.Wpf</c> package instead.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
|
/// <param name="source">Source sequence.</param>
|
|
/// <param name="source">Source sequence.</param>
|
|
@@ -196,6 +267,7 @@ namespace System.Reactive.Linq
|
|
|
/// Only the side-effects of subscribing to the source sequence and disposing subscriptions to the source sequence are run on the specified dispatcher.
|
|
/// Only the side-effects of subscribing to the source sequence and disposing subscriptions to the source sequence are run on the specified dispatcher.
|
|
|
/// In order to invoke observer callbacks on the specified dispatcher, e.g. to render results in a control, use <see cref="DispatcherObservable.ObserveOn{TSource}(IObservable{TSource}, Dispatcher)"/>.
|
|
/// In order to invoke observer callbacks on the specified dispatcher, e.g. to render results in a control, use <see cref="DispatcherObservable.ObserveOn{TSource}(IObservable{TSource}, Dispatcher)"/>.
|
|
|
/// </remarks>
|
|
/// </remarks>
|
|
|
|
|
+ [Obsolete("Use the SubscribeOnWpfDispatcher extension method defined by System.Reactive.Linq.WpfDispatcherObservable in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static IObservable<TSource> SubscribeOn<TSource>(this IObservable<TSource> source, Dispatcher dispatcher)
|
|
public static IObservable<TSource> SubscribeOn<TSource>(this IObservable<TSource> source, Dispatcher dispatcher)
|
|
|
{
|
|
{
|
|
|
if (source == null)
|
|
if (source == null)
|
|
@@ -212,7 +284,9 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Wraps the source sequence in order to run its subscription and unsubscription logic on the specified dispatcher.
|
|
|
|
|
|
|
+ /// Obsolete. Use the <c>SubscribeOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
+ /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
+ /// <c>System.Reactive.Integration.Wpf</c> package instead.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
|
/// <param name="source">Source sequence.</param>
|
|
/// <param name="source">Source sequence.</param>
|
|
@@ -224,6 +298,7 @@ namespace System.Reactive.Linq
|
|
|
/// Only the side-effects of subscribing to the source sequence and disposing subscriptions to the source sequence are run on the specified dispatcher.
|
|
/// Only the side-effects of subscribing to the source sequence and disposing subscriptions to the source sequence are run on the specified dispatcher.
|
|
|
/// In order to invoke observer callbacks on the specified dispatcher, e.g. to render results in a control, use <see cref="DispatcherObservable.ObserveOn{TSource}(IObservable{TSource}, Dispatcher, DispatcherPriority)"/>.
|
|
/// In order to invoke observer callbacks on the specified dispatcher, e.g. to render results in a control, use <see cref="DispatcherObservable.ObserveOn{TSource}(IObservable{TSource}, Dispatcher, DispatcherPriority)"/>.
|
|
|
/// </remarks>
|
|
/// </remarks>
|
|
|
|
|
+ [Obsolete("Use the SubscribeOnWpfDispatcher extension method defined by System.Reactive.Linq.WpfDispatcherObservable in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static IObservable<TSource> SubscribeOn<TSource>(this IObservable<TSource> source, Dispatcher dispatcher, DispatcherPriority priority)
|
|
public static IObservable<TSource> SubscribeOn<TSource>(this IObservable<TSource> source, Dispatcher dispatcher, DispatcherPriority priority)
|
|
|
{
|
|
{
|
|
|
if (source == null)
|
|
if (source == null)
|
|
@@ -239,9 +314,10 @@ namespace System.Reactive.Linq
|
|
|
return SubscribeOn_(source, dispatcher, priority);
|
|
return SubscribeOn_(source, dispatcher, priority);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Wraps the source sequence in order to run its subscription and unsubscription logic on the specified dispatcher scheduler.
|
|
|
|
|
|
|
+ /// Obsolete. Use the <c>SubscribeOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
+ /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
+ /// <c>System.Reactive.Integration.Wpf</c> package instead.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
|
/// <param name="source">Source sequence.</param>
|
|
/// <param name="source">Source sequence.</param>
|
|
@@ -252,6 +328,7 @@ namespace System.Reactive.Linq
|
|
|
/// Only the side-effects of subscribing to the source sequence and disposing subscriptions to the source sequence are run on the specified scheduler.
|
|
/// Only the side-effects of subscribing to the source sequence and disposing subscriptions to the source sequence are run on the specified scheduler.
|
|
|
/// In order to invoke observer callbacks on the specified scheduler, e.g. to render results in a control, use <see cref="DispatcherObservable.ObserveOn{TSource}(IObservable{TSource}, DispatcherScheduler)"/>.
|
|
/// In order to invoke observer callbacks on the specified scheduler, e.g. to render results in a control, use <see cref="DispatcherObservable.ObserveOn{TSource}(IObservable{TSource}, DispatcherScheduler)"/>.
|
|
|
/// </remarks>
|
|
/// </remarks>
|
|
|
|
|
+ [Obsolete("Use the SubscribeOnWpfDispatcher extension method defined by System.Reactive.Linq.WpfDispatcherObservable in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static IObservable<TSource> SubscribeOn<TSource>(this IObservable<TSource> source, DispatcherScheduler scheduler)
|
|
public static IObservable<TSource> SubscribeOn<TSource>(this IObservable<TSource> source, DispatcherScheduler scheduler)
|
|
|
{
|
|
{
|
|
|
if (source == null)
|
|
if (source == null)
|
|
@@ -268,7 +345,9 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Wraps the source sequence in order to run its subscription and unsubscription logic on the dispatcher associated with the specified object.
|
|
|
|
|
|
|
+ /// Obsolete. Use the <c>SubscribeOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
+ /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
+ /// <c>System.Reactive.Integration.Wpf</c> package instead.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
|
/// <param name="source">Source sequence.</param>
|
|
/// <param name="source">Source sequence.</param>
|
|
@@ -279,6 +358,7 @@ namespace System.Reactive.Linq
|
|
|
/// Only the side-effects of subscribing to the source sequence and disposing subscriptions to the source sequence are run on the dispatcher associated with the specified object.
|
|
/// Only the side-effects of subscribing to the source sequence and disposing subscriptions to the source sequence are run on the dispatcher associated with the specified object.
|
|
|
/// In order to invoke observer callbacks on the dispatcher associated with the specified object, e.g. to render results in a control, use <see cref="DispatcherObservable.ObserveOn{TSource}(IObservable{TSource}, DispatcherObject)"/>.
|
|
/// In order to invoke observer callbacks on the dispatcher associated with the specified object, e.g. to render results in a control, use <see cref="DispatcherObservable.ObserveOn{TSource}(IObservable{TSource}, DispatcherObject)"/>.
|
|
|
/// </remarks>
|
|
/// </remarks>
|
|
|
|
|
+ [Obsolete("Use the SubscribeOnWpfDispatcher extension method defined by System.Reactive.Linq.WpfDispatcherObservable in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static IObservable<TSource> SubscribeOn<TSource>(this IObservable<TSource> source, DispatcherObject dispatcherObject)
|
|
public static IObservable<TSource> SubscribeOn<TSource>(this IObservable<TSource> source, DispatcherObject dispatcherObject)
|
|
|
{
|
|
{
|
|
|
if (source == null)
|
|
if (source == null)
|
|
@@ -295,7 +375,9 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Wraps the source sequence in order to run its subscription and unsubscription logic on the dispatcher associated with the specified object.
|
|
|
|
|
|
|
+ /// Obsolete. Use the <c>SubscribeOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
+ /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
+ /// <c>System.Reactive.Integration.Wpf</c> package instead.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
|
/// <param name="source">Source sequence.</param>
|
|
/// <param name="source">Source sequence.</param>
|
|
@@ -307,6 +389,7 @@ namespace System.Reactive.Linq
|
|
|
/// Only the side-effects of subscribing to the source sequence and disposing subscriptions to the source sequence are run on the dispatcher associated with the specified object.
|
|
/// Only the side-effects of subscribing to the source sequence and disposing subscriptions to the source sequence are run on the dispatcher associated with the specified object.
|
|
|
/// In order to invoke observer callbacks on the dispatcher associated with the specified object, e.g. to render results in a control, use <see cref="DispatcherObservable.ObserveOn{TSource}(IObservable{TSource}, DispatcherObject, DispatcherPriority)"/>.
|
|
/// In order to invoke observer callbacks on the dispatcher associated with the specified object, e.g. to render results in a control, use <see cref="DispatcherObservable.ObserveOn{TSource}(IObservable{TSource}, DispatcherObject, DispatcherPriority)"/>.
|
|
|
/// </remarks>
|
|
/// </remarks>
|
|
|
|
|
+ [Obsolete("Use the SubscribeOnWpfDispatcher extension method defined by System.Reactive.Linq.WpfDispatcherObservable in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static IObservable<TSource> SubscribeOn<TSource>(this IObservable<TSource> source, DispatcherObject dispatcherObject, DispatcherPriority priority)
|
|
public static IObservable<TSource> SubscribeOn<TSource>(this IObservable<TSource> source, DispatcherObject dispatcherObject, DispatcherPriority priority)
|
|
|
{
|
|
{
|
|
|
if (source == null)
|
|
if (source == null)
|
|
@@ -323,7 +406,9 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Wraps the source sequence in order to run its subscription and unsubscription logic on the dispatcher associated with the current thread.
|
|
|
|
|
|
|
+ /// Obsolete. Use the <c>SubscribeOnCurrentWpfDispatcher</c> extension method defined by
|
|
|
|
|
+ /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
+ /// <c>System.Reactive.Integration.Wpf</c> package instead.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
|
/// <param name="source">Source sequence.</param>
|
|
/// <param name="source">Source sequence.</param>
|
|
@@ -333,6 +418,7 @@ namespace System.Reactive.Linq
|
|
|
/// Only the side-effects of subscribing to the source sequence and disposing subscriptions to the source sequence are run on the dispatcher associated with the current thread.
|
|
/// Only the side-effects of subscribing to the source sequence and disposing subscriptions to the source sequence are run on the dispatcher associated with the current thread.
|
|
|
/// In order to invoke observer callbacks on the dispatcher associated with the current thread, e.g. to render results in a control, use <see cref="DispatcherObservable.ObserveOnDispatcher{TSource}(IObservable{TSource})"/>.
|
|
/// In order to invoke observer callbacks on the dispatcher associated with the current thread, e.g. to render results in a control, use <see cref="DispatcherObservable.ObserveOnDispatcher{TSource}(IObservable{TSource})"/>.
|
|
|
/// </remarks>
|
|
/// </remarks>
|
|
|
|
|
+ [Obsolete("Use the SubscribeOnCurrentWpfDispatcher extension method defined by System.Reactive.Linq.WpfDispatcherObservable in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static IObservable<TSource> SubscribeOnDispatcher<TSource>(this IObservable<TSource> source)
|
|
public static IObservable<TSource> SubscribeOnDispatcher<TSource>(this IObservable<TSource> source)
|
|
|
{
|
|
{
|
|
|
if (source == null)
|
|
if (source == null)
|
|
@@ -344,7 +430,9 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Wraps the source sequence in order to run its subscription and unsubscription logic on the dispatcher associated with the current thread.
|
|
|
|
|
|
|
+ /// Obsolete. Use the <c>SubscribeOnCurrentWpfDispatcher</c> extension method defined by
|
|
|
|
|
+ /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
+ /// <c>System.Reactive.Integration.Wpf</c> package instead.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
|
|
|
/// <param name="source">Source sequence.</param>
|
|
/// <param name="source">Source sequence.</param>
|
|
@@ -355,6 +443,7 @@ namespace System.Reactive.Linq
|
|
|
/// Only the side-effects of subscribing to the source sequence and disposing subscriptions to the source sequence are run on the dispatcher associated with the current thread.
|
|
/// Only the side-effects of subscribing to the source sequence and disposing subscriptions to the source sequence are run on the dispatcher associated with the current thread.
|
|
|
/// In order to invoke observer callbacks on the dispatcher associated with the current thread, e.g. to render results in a control, use <see cref="DispatcherObservable.ObserveOnDispatcher{TSource}(IObservable{TSource}, DispatcherPriority)"/>.
|
|
/// In order to invoke observer callbacks on the dispatcher associated with the current thread, e.g. to render results in a control, use <see cref="DispatcherObservable.ObserveOnDispatcher{TSource}(IObservable{TSource}, DispatcherPriority)"/>.
|
|
|
/// </remarks>
|
|
/// </remarks>
|
|
|
|
|
+ [Obsolete("Use the SubscribeOnCurrentWpfDispatcher extension method defined by System.Reactive.Linq.WpfDispatcherObservable in the System.Reactive.Integration.Wpf package instead", error: false)]
|
|
|
public static IObservable<TSource> SubscribeOnDispatcher<TSource>(this IObservable<TSource> source, DispatcherPriority priority)
|
|
public static IObservable<TSource> SubscribeOnDispatcher<TSource>(this IObservable<TSource> source, DispatcherPriority priority)
|
|
|
{
|
|
{
|
|
|
if (source == null)
|
|
if (source == null)
|