Skip to content

,System.Action{--0})} ,System.Action{--0},System.Func{--0})} ,System.Action{--0},System.Reactive.Concurrency.IScheduler,System.Func{--0})} ,System.Action{--0},System.Action{--0},System.Func{--0})} ,System.Action{--0},System.Action{--0},System.Reactive.Concurrency.IScheduler,System.Func{--0})}

AsValueExtensions.AsLazyValue(IObservable, Action) method

Defined in

Type: AsValueExtensions Namespace: ReactiveMarbles.Mvvm Assembly: ReactiveMarbles.Mvvm.dll

Applies to

net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.0

Overloads

  • 1. public static IValueBinder<T?> AsLazyValue<T>(this IObservable<T?> source, Action<T?> onChanged)
  • 2. public static IValueBinder<T> AsLazyValue<T>(this IObservable<T> source, Action<T> onChanged, Func<T> initialValue)
  • 3. public static IValueBinder<T> AsLazyValue<T>(this IObservable<T> source, Action<T?> onChanged, IScheduler scheduler, Func<T> initialValue)
  • 4. public static IValueBinder<T> AsLazyValue<T>(this IObservable<T> source, Action<T?> onChanging, Action<T?> onChanged, Func<T> initialValue)
  • 5. public static IValueBinder<T> AsLazyValue<T>(this IObservable<T> source, Action<T?> onChanging, Action<T> onChanged, IScheduler scheduler, Func<T> initialValue)

1. Overload

public static IValueBinder<T?> AsLazyValue<T>(this IObservable<T?> source, Action<T?> onChanged)

View source

Summary: Projects an observable value to a property for binding. This value is lazy and will not subscribe until first access.

Type parameters

NameDescription
TThe property type.

Parameters

NameTypeDescription
sourceIObservableThe source observable.
onChangedActionCallback with the changed value.

Returns: IValueBinder -- A binder.

2. Overload

public static IValueBinder<T> AsLazyValue<T>(this IObservable<T> source, Action<T> onChanged, Func<T> initialValue)

View source

Summary: Projects an observable value to a property for binding. This value is lazy and will not subscribe until first access.

Type parameters

NameDescription
TThe property type.

Parameters

NameTypeDescription
sourceIObservableThe source observable.
onChangedActionCallback with the changed value.
initialValueFuncThe function that provides the initial value.

Returns: IValueBinder -- A binder.

3. Overload

public static IValueBinder<T> AsLazyValue<T>(this IObservable<T> source, Action<T?> onChanged, IScheduler scheduler, Func<T> initialValue)

View source

Summary: Projects an observable value to a property for binding. This value is lazy and will not subscribe until first access.

Type parameters

NameDescription
TThe property type.

Parameters

NameTypeDescription
sourceIObservableThe source observable.
onChangedActionCallback with the changed value.
scheduler[IScheduler](#The scheduler instance where the value will output.
initialValueFuncThe function that provides the initial value.

Returns: IValueBinder -- A binder.

4. Overload

public static IValueBinder<T> AsLazyValue<T>(this IObservable<T> source, Action<T?> onChanging, Action<T?> onChanged, Func<T> initialValue)

View source

Summary: Projects an observable value to a property for binding. This value is lazy and will not subscribe until first access.

Type parameters

NameDescription
TThe property type.

Parameters

NameTypeDescription
sourceIObservableThe source observable.
onChangingActionCallback with the changing value.
onChangedActionCallback with the changed value.
initialValueFuncThe function that provides the initial value.

Returns: IValueBinder -- A binder.

5. Overload

public static IValueBinder<T> AsLazyValue<T>(this IObservable<T> source, Action<T?> onChanging, Action<T> onChanged, IScheduler scheduler, Func<T> initialValue)

View source

Summary: Projects an observable value to a property for binding. This value is lazy and will not subscribe until first access.

Type parameters

NameDescription
TThe property type.

Parameters

NameTypeDescription
sourceIObservableThe source observable.
onChangingActionCallback with the changing value.
onChangedActionCallback with the changed value.
scheduler[IScheduler](#The scheduler instance where the value will output.
initialValueFuncThe function that provides the initial value.

Returns: IValueBinder -- A binder.