)} ,System.Action{--0})} ,System.Action{--0},System.Action{System.Exception})} ,System.Action{--0},System.Action)} ,System.Action{--0},System.Action{System.Exception},System.Action)} ,System.IObserver{--0},System.Threading.CancellationToken)} ,System.Threading.CancellationToken)} ,System.Action{--0},System.Threading.CancellationToken)} ,System.Action{--0},System.Action{System.Exception},System.Threading.CancellationToken)} ,System.Action{--0},System.Action,System.Threading.CancellationToken)} ,System.Action{--0},System.Action{System.Exception},System.Action,System.Threading.CancellationToken)}
ObservableExtensions.Subscribe(IObservable) method¶
Defined in
Type: ObservableExtensions
Namespace: System
Assembly: System.Reactive.dll
Applies to
net8.0, net8.0-windows10.0.19041, netstandard2.0
Overloads¶
-
public static IDisposable Subscribe<T>(this IObservable<T> source) -
public static IDisposable Subscribe<T>(this IObservable<T> source, Action<T> onNext) -
public static IDisposable Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError) -
public static IDisposable Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action onCompleted) -
public static IDisposable Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError, Action onCompleted) -
public static void Subscribe<T>(this IObservable<T> source, IObserver<T> observer, CancellationToken token) -
public static void Subscribe<T>(this IObservable<T> source, CancellationToken token) -
public static void Subscribe<T>(this IObservable<T> source, Action<T> onNext, CancellationToken token) -
public static void Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError, CancellationToken token) -
public static void Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action onCompleted, CancellationToken token) -
public static void Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError, Action onCompleted, CancellationToken token)
1. Overload¶
public static IDisposable Subscribe<T>(this IObservable<T> source)
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
Returns: IDisposable
2. Overload¶
public static IDisposable Subscribe<T>(this IObservable<T> source, Action<T> onNext)
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
onNext | Action | -- |
Returns: IDisposable
3. Overload¶
public static IDisposable Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError)
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
onNext | Action | -- |
onError | Action | -- |
Returns: IDisposable
4. Overload¶
public static IDisposable Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action onCompleted)
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
onNext | Action | -- |
onCompleted | Action | -- |
Returns: IDisposable
5. Overload¶
public static IDisposable Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError, Action onCompleted)
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
onNext | Action | -- |
onError | Action | -- |
onCompleted | Action | -- |
Returns: IDisposable
6. Overload¶
public static void Subscribe<T>(this IObservable<T> source, IObserver<T> observer, CancellationToken token)
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
observer | IObserver | -- |
token | CancellationToken | -- |
7. Overload¶
public static void Subscribe<T>(this IObservable<T> source, CancellationToken token)
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
token | CancellationToken | -- |
8. Overload¶
public static void Subscribe<T>(this IObservable<T> source, Action<T> onNext, CancellationToken token)
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
onNext | Action | -- |
token | CancellationToken | -- |
9. Overload¶
public static void Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError, CancellationToken token)
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
onNext | Action | -- |
onError | Action | -- |
token | CancellationToken | -- |
10. Overload¶
public static void Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action onCompleted, CancellationToken token)
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
onNext | Action | -- |
onCompleted | Action | -- |
token | CancellationToken | -- |
11. Overload¶
public static void Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError, Action onCompleted, CancellationToken token)
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
onNext | Action | -- |
onError | Action | -- |
onCompleted | Action | -- |
token | CancellationToken | -- |