,System.IObserver{--0},System.Boolean[])} },System.IObserver{System.Nullable{--0}},System.Boolean[])} ,System.Action{--0},System.Action{System.Exception},System.Boolean[])} },System.Action{System.Nullable{--0}},System.Action{System.Exception},System.Boolean[])} ,System.Action{--0},System.Action{System.Exception},System.Action,System.Boolean[])} },System.Action{System.Nullable{--0}},System.Action{System.Exception},System.Action,System.Boolean[])} ,System.Action{System.Exception},System.Boolean[])} },System.Action{System.Exception},System.Boolean[])} ,System.Action{System.Exception},System.Action,System.Boolean[])} },System.Action{System.Exception},System.Action,System.Boolean[])} ,System.IObserver{--0})} ,System.Action{--0},System.Action{System.Exception})} ,System.Action{--0},System.Action{System.Exception},System.Action)} ,System.Action{System.Exception})} ,System.Action{System.Exception},System.Action)}
LinqExtensions.SubscribeSafe(IObservable, IObserver, bool[]) method¶
Defined in
Type: LinqExtensions
Namespace: ReactiveUI.Primitives.Reactive
Assembly: ReactiveUI.Primitives.Reactive.dll
Applies to
net10.0, net10.0-android36.0, net10.0-ios26.0, net10.0-macos26.0, net10.0-tvos26.0, net10.0-maccatalyst26.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-desktop1.0, net9.0-browserwasm1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net481, net471, net462
Overloads¶
- 1.
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, IObserver<T> observer, params bool[] allowNullable) where T : class - 2.
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, IObserver<T?> observer, params bool[] allowNullable) where T : struct - 3.
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<T> onNext, Action<Exception> onError, params bool[] allowNullable) where T : class - 4.
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<T?> onNext, Action<Exception> onError, params bool[] allowNullable) where T : struct - 5.
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<T> onNext, Action<Exception> onError, Action onCompleted, params bool[] allowNullable) where T : class - 6.
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<T?> onNext, Action<Exception> onError, Action onCompleted, params bool[] allowNullable) where T : struct - 7.
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<Exception> onError, params bool[] allowNullable) where T : class - 8.
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<Exception> onError, params bool[] allowNullable) where T : struct - 9.
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<Exception> onError, Action onCompleted, params bool[] allowNullable) where T : class - 10.
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<Exception> onError, Action onCompleted, params bool[] allowNullable) where T : struct - 11.
public static IDisposable SubscribeSafe<T>(this IObservable<T> source, IObserver<T> observer) where T : notnull - 12.
public static IDisposable SubscribeSafe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError) where T : notnull - 13.
public static IDisposable SubscribeSafe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError, Action onCompleted) where T : notnull - 14.
public static IDisposable SubscribeSafe<T>(this IObservable<T> source, Action<Exception> onError) where T : notnull - 15.
public static IDisposable SubscribeSafe<T>(this IObservable<T> source, Action<Exception> onError, Action onCompleted) where T : notnull
1. Overload¶
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, IObserver<T> observer, params bool[] allowNullable) where T : class
Summary: Subscribes a nullable reference observer with downstream exception protection from static-call syntax.
Type parameters
| Name | Description |
|---|---|
T | The non-nullable reference value type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source sequence. |
observer | IObserver | The observer to subscribe. |
params allowNullable | bool[] | Reserved for nullable overload resolution. |
Returns: IDisposable -- A disposable that cancels the subscription.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or observer is null. |
2. Overload¶
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, IObserver<T?> observer, params bool[] allowNullable) where T : struct
Summary: Subscribes a nullable value observer with downstream exception protection from static-call syntax.
Type parameters
| Name | Description |
|---|---|
T | The non-nullable value type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source sequence. |
observer | IObserver | The observer to subscribe. |
params allowNullable | bool[] | Reserved for nullable overload resolution. |
Returns: IDisposable -- A disposable that cancels the subscription.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or observer is null. |
3. Overload¶
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<T> onNext, Action<Exception> onError, params bool[] allowNullable) where T : class
Summary: Subscribes nullable reference callbacks with downstream exception protection from static-call syntax.
Type parameters
| Name | Description |
|---|---|
T | The non-nullable reference value type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source sequence. |
onNext | Action | The action to invoke for each value. |
onError | Action | The action to invoke for an error. |
params allowNullable | bool[] | Reserved for nullable overload resolution. |
Returns: IDisposable -- A disposable that cancels the subscription.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | A required argument is null. |
4. Overload¶
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<T?> onNext, Action<Exception> onError, params bool[] allowNullable) where T : struct
Summary: Subscribes nullable value callbacks with downstream exception protection from static-call syntax.
Type parameters
| Name | Description |
|---|---|
T | The non-nullable value type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source sequence. |
onNext | Action | The action to invoke for each value. |
onError | Action | The action to invoke for an error. |
params allowNullable | bool[] | Reserved for nullable overload resolution. |
Returns: IDisposable -- A disposable that cancels the subscription.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | A required argument is null. |
5. Overload¶
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<T> onNext, Action<Exception> onError, Action onCompleted, params bool[] allowNullable) where T : class
Summary: Subscribes nullable reference callbacks with downstream exception protection from static-call syntax.
Type parameters
| Name | Description |
|---|---|
T | The non-nullable reference value type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source sequence. |
onNext | Action | The action to invoke for each value. |
onError | Action | The action to invoke for an error. |
onCompleted | Action | The action to invoke when the sequence completes. |
params allowNullable | bool[] | Reserved for nullable overload resolution. |
Returns: IDisposable -- A disposable that cancels the subscription.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | A required argument is null. |
6. Overload¶
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<T?> onNext, Action<Exception> onError, Action onCompleted, params bool[] allowNullable) where T : struct
Summary: Subscribes nullable value callbacks with downstream exception protection from static-call syntax.
Type parameters
| Name | Description |
|---|---|
T | The non-nullable value type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source sequence. |
onNext | Action | The action to invoke for each value. |
onError | Action | The action to invoke for an error. |
onCompleted | Action | The action to invoke when the sequence completes. |
params allowNullable | bool[] | Reserved for nullable overload resolution. |
Returns: IDisposable -- A disposable that cancels the subscription.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | A required argument is null. |
7. Overload¶
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<Exception> onError, params bool[] allowNullable) where T : class
Summary: Subscribes nullable reference terminal callbacks with downstream exception protection from static-call syntax.
Type parameters
| Name | Description |
|---|---|
T | The non-nullable reference value type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source sequence. |
onError | Action | The action to invoke for an error. |
params allowNullable | bool[] | Reserved for nullable overload resolution. |
Returns: IDisposable -- A disposable that cancels the subscription.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | A required argument is null. |
8. Overload¶
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<Exception> onError, params bool[] allowNullable) where T : struct
Summary: Subscribes nullable value terminal callbacks with downstream exception protection from static-call syntax.
Type parameters
| Name | Description |
|---|---|
T | The non-nullable value type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source sequence. |
onError | Action | The action to invoke for an error. |
params allowNullable | bool[] | Reserved for nullable overload resolution. |
Returns: IDisposable -- A disposable that cancels the subscription.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | A required argument is null. |
9. Overload¶
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<Exception> onError, Action onCompleted, params bool[] allowNullable) where T : class
Summary: Subscribes nullable reference terminal callbacks with downstream exception protection from static-call syntax.
Type parameters
| Name | Description |
|---|---|
T | The non-nullable reference value type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source sequence. |
onError | Action | The action to invoke for an error. |
onCompleted | Action | The action to invoke when the sequence completes. |
params allowNullable | bool[] | Reserved for nullable overload resolution. |
Returns: IDisposable -- A disposable that cancels the subscription.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | A required argument is null. |
10. Overload¶
public static IDisposable SubscribeSafe<T>(IObservable<T?> source, Action<Exception> onError, Action onCompleted, params bool[] allowNullable) where T : struct
Summary: Subscribes nullable value terminal callbacks with downstream exception protection from static-call syntax.
Type parameters
| Name | Description |
|---|---|
T | The non-nullable value type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source sequence. |
onError | Action | The action to invoke for an error. |
onCompleted | Action | The action to invoke when the sequence completes. |
params allowNullable | bool[] | Reserved for nullable overload resolution. |
Returns: IDisposable -- A disposable that cancels the subscription.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | A required argument is null. |
11. Overload¶
public static IDisposable SubscribeSafe<T>(this IObservable<T> source, IObserver<T> observer) where T : notnull
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
observer | IObserver | -- |
Returns: IDisposable
12. Overload¶
public static IDisposable SubscribeSafe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError) where T : notnull
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
onNext | Action | -- |
onError | Action | -- |
Returns: IDisposable
13. Overload¶
public static IDisposable SubscribeSafe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError, Action onCompleted) where T : notnull
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
onNext | Action | -- |
onError | Action | -- |
onCompleted | Action | -- |
Returns: IDisposable
14. Overload¶
public static IDisposable SubscribeSafe<T>(this IObservable<T> source, Action<Exception> onError) where T : notnull
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
onError | Action | -- |
Returns: IDisposable
15. Overload¶
public static IDisposable SubscribeSafe<T>(this IObservable<T> source, Action<Exception> onError, Action onCompleted) where T : notnull
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | -- |
onError | Action | -- |
onCompleted | Action | -- |
Returns: IDisposable