Skip to content

,System.String,System.String,System.Int32)}

SubscribeSafeExtensions.SubscribeSafe(IObservable, string?, string?, int) method

Defined in

Type: SubscribeSafeExtensions Namespace: System.Reactive.Linq Assembly: Sextant.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.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, netstandard2.0, net471

public static IDisposable SubscribeSafe<T>(this IObservable<T> observable, string? callerMemberName = null, string? callerFilePath = null, int callerLineNumber = 0)

View source

Summary: Subscribes to an Observable and provides default debugging in the case of an exception. It will provide the caller information as part of the logging.

Type parameters

NameDescription
TThe type of item signaled as part of the observable.

Parameters

NameTypeDescription
observableIObservableThe observable to subscribe to.
callerMemberName = nullstring?The name of the caller member.
callerFilePath = nullstring?The file path of the caller member.
callerLineNumber = 0intThe line number of the caller member.

Returns: IDisposable -- A disposable which when disposed will unsubscribe from the observable.