|
@@ -9,73 +9,20 @@ using System.Windows.Threading;
|
|
|
namespace System.Reactive.Linq
|
|
namespace System.Reactive.Linq
|
|
|
{
|
|
{
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. The <c>System.Reactive.For.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).
|
|
|
|
|
|
|
+ /// Provides a set of extension methods for scheduling actions performed through observable sequences on UI dispatchers.
|
|
|
/// </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.For.Wpf package instead", error: false)]
|
|
|
|
|
public static class DispatcherObservable
|
|
public static class DispatcherObservable
|
|
|
{
|
|
{
|
|
|
#region ObserveOn[Dispatcher]
|
|
#region ObserveOn[Dispatcher]
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. Use the <c>ObserveOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
- /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
- /// <c>System.Reactive.For.Wpf</c> package instead.
|
|
|
|
|
|
|
+ /// Wraps the source sequence in order to run its observer callbacks on the specified dispatcher.
|
|
|
/// </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.For.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)
|
|
@@ -92,9 +39,7 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. Use the <c>ObserveOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
- /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
- /// <c>System.Reactive.For.Wpf</c> package instead.
|
|
|
|
|
|
|
+ /// Wraps the source sequence in order to run its observer callbacks on the specified dispatcher.
|
|
|
/// </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>
|
|
@@ -102,7 +47,6 @@ 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.For.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)
|
|
@@ -119,16 +63,13 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. Use the <c>ObserveOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
- /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
- /// <c>System.Reactive.For.Wpf</c> package instead.
|
|
|
|
|
|
|
+ /// Wraps the source sequence in order to run its observer callbacks on the specified dispatcher scheduler.
|
|
|
/// </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.For.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)
|
|
@@ -144,17 +85,15 @@ namespace System.Reactive.Linq
|
|
|
return ObserveOn_(source, scheduler.Dispatcher, scheduler.Priority);
|
|
return ObserveOn_(source, scheduler.Dispatcher, scheduler.Priority);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. Use the <c>ObserveOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
- /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
- /// <c>System.Reactive.For.Wpf</c> package instead.
|
|
|
|
|
|
|
+ /// Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the specified object.
|
|
|
/// </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.For.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)
|
|
@@ -171,9 +110,7 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. Use the <c>ObserveOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
- /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
- /// <c>System.Reactive.For.Wpf</c> package instead.
|
|
|
|
|
|
|
+ /// Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the specified object.
|
|
|
/// </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>
|
|
@@ -181,7 +118,6 @@ 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.For.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)
|
|
@@ -197,16 +133,14 @@ namespace System.Reactive.Linq
|
|
|
return ObserveOn_(source, dispatcherObject.Dispatcher, priority);
|
|
return ObserveOn_(source, dispatcherObject.Dispatcher, priority);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. Use the <c>ObserveOnCurrentWpfDispatcher</c> extension method defined by
|
|
|
|
|
- /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
- /// <c>System.Reactive.For.Wpf</c> package instead.
|
|
|
|
|
|
|
+ /// Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the current thread.
|
|
|
/// </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.For.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)
|
|
@@ -218,16 +152,13 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. Use the <c>ObserveOnCurrentWpfDispatcher</c> extension method defined by
|
|
|
|
|
- /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
- /// <c>System.Reactive.For.Wpf</c> package instead.
|
|
|
|
|
|
|
+ /// Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the current thread.
|
|
|
/// </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.For.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)
|
|
@@ -254,9 +185,7 @@ namespace System.Reactive.Linq
|
|
|
#region SubscribeOn[Dispatcher]
|
|
#region SubscribeOn[Dispatcher]
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. Use the <c>SubscribeOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
- /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
- /// <c>System.Reactive.For.Wpf</c> package instead.
|
|
|
|
|
|
|
+ /// Wraps the source sequence in order to run its subscription and unsubscription logic on the specified dispatcher.
|
|
|
/// </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>
|
|
@@ -267,7 +196,6 @@ 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.For.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)
|
|
@@ -284,9 +212,7 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. Use the <c>SubscribeOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
- /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
- /// <c>System.Reactive.For.Wpf</c> package instead.
|
|
|
|
|
|
|
+ /// Wraps the source sequence in order to run its subscription and unsubscription logic on the specified dispatcher.
|
|
|
/// </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>
|
|
@@ -298,7 +224,6 @@ 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.For.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)
|
|
@@ -314,10 +239,9 @@ namespace System.Reactive.Linq
|
|
|
return SubscribeOn_(source, dispatcher, priority);
|
|
return SubscribeOn_(source, dispatcher, priority);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. Use the <c>SubscribeOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
- /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
- /// <c>System.Reactive.For.Wpf</c> package instead.
|
|
|
|
|
|
|
+ /// Wraps the source sequence in order to run its subscription and unsubscription logic on the specified dispatcher scheduler.
|
|
|
/// </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>
|
|
@@ -328,7 +252,6 @@ 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.For.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)
|
|
@@ -345,9 +268,7 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. Use the <c>SubscribeOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
- /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
- /// <c>System.Reactive.For.Wpf</c> package instead.
|
|
|
|
|
|
|
+ /// Wraps the source sequence in order to run its subscription and unsubscription logic on the dispatcher associated with the specified object.
|
|
|
/// </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>
|
|
@@ -358,7 +279,6 @@ 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.For.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)
|
|
@@ -375,9 +295,7 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. Use the <c>SubscribeOnWpfDispatcher</c> extension method defined by
|
|
|
|
|
- /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
- /// <c>System.Reactive.For.Wpf</c> package instead.
|
|
|
|
|
|
|
+ /// Wraps the source sequence in order to run its subscription and unsubscription logic on the dispatcher associated with the specified object.
|
|
|
/// </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>
|
|
@@ -389,7 +307,6 @@ 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.For.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)
|
|
@@ -406,9 +323,7 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. Use the <c>SubscribeOnCurrentWpfDispatcher</c> extension method defined by
|
|
|
|
|
- /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
- /// <c>System.Reactive.For.Wpf</c> package instead.
|
|
|
|
|
|
|
+ /// Wraps the source sequence in order to run its subscription and unsubscription logic on the dispatcher associated with the current thread.
|
|
|
/// </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>
|
|
@@ -418,7 +333,6 @@ 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.For.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)
|
|
@@ -430,9 +344,7 @@ namespace System.Reactive.Linq
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// Obsolete. Use the <c>SubscribeOnCurrentWpfDispatcher</c> extension method defined by
|
|
|
|
|
- /// <c>System.Reactive.Linq.WpfDispatcherObservable</c> in the
|
|
|
|
|
- /// <c>System.Reactive.For.Wpf</c> package instead.
|
|
|
|
|
|
|
+ /// Wraps the source sequence in order to run its subscription and unsubscription logic on the dispatcher associated with the current thread.
|
|
|
/// </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>
|
|
@@ -443,7 +355,6 @@ 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.For.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)
|