<PackageReference Include="System.Reactive" Version="6.0.1" />

System.ObservableExtensions

public static class ObservableExtensions
Provides a set of static methods for subscribing delegates to observables.
namespace System { public static class ObservableExtensions { public static IDisposable Subscribe<[System.Runtime.CompilerServices.Nullable(2)] T>(this IObservable<T> source); public static IDisposable Subscribe<[System.Runtime.CompilerServices.Nullable(2)] T>(this IObservable<T> source, Action<T> onNext); public static IDisposable Subscribe<[System.Runtime.CompilerServices.Nullable(2)] T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError); public static IDisposable Subscribe<[System.Runtime.CompilerServices.Nullable(2)] T>(this IObservable<T> source, Action<T> onNext, Action onCompleted); public static IDisposable Subscribe<[System.Runtime.CompilerServices.Nullable(2)] T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError, Action onCompleted); public static void Subscribe<[System.Runtime.CompilerServices.Nullable(2)] T>(this IObservable<T> source, IObserver<T> observer, CancellationToken token); public static void Subscribe<[System.Runtime.CompilerServices.Nullable(2)] T>(this IObservable<T> source, CancellationToken token); public static void Subscribe<[System.Runtime.CompilerServices.Nullable(2)] T>(this IObservable<T> source, Action<T> onNext, CancellationToken token); public static void Subscribe<[System.Runtime.CompilerServices.Nullable(2)] T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError, CancellationToken token); public static void Subscribe<[System.Runtime.CompilerServices.Nullable(2)] T>(this IObservable<T> source, Action<T> onNext, Action onCompleted, CancellationToken token); public static void Subscribe<[System.Runtime.CompilerServices.Nullable(2)] T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError, Action onCompleted, CancellationToken token); public static IDisposable SubscribeSafe<[System.Runtime.CompilerServices.Nullable(2)] T>(this IObservable<T> source, IObserver<T> observer); } }