,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)
Summary: Projects an observable value to a property for binding. This value is lazy and will not subscribe until first access.
Type parameters
| Name | Description |
|---|---|
T | The property type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source observable. |
onChanged | Action | Callback with the changed value. |
Returns: IValueBinder
2. Overload¶
public static IValueBinder<T> AsLazyValue<T>(this IObservable<T> source, Action<T> onChanged, Func<T> initialValue)
Summary: Projects an observable value to a property for binding. This value is lazy and will not subscribe until first access.
Type parameters
| Name | Description |
|---|---|
T | The property type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source observable. |
onChanged | Action | Callback with the changed value. |
initialValue | Func | The function that provides the initial value. |
Returns: IValueBinder
3. Overload¶
public static IValueBinder<T> AsLazyValue<T>(this IObservable<T> source, Action<T?> onChanged, IScheduler scheduler, Func<T> initialValue)
Summary: Projects an observable value to a property for binding. This value is lazy and will not subscribe until first access.
Type parameters
| Name | Description |
|---|---|
T | The property type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source observable. |
onChanged | Action | Callback with the changed value. |
scheduler | [IScheduler](# | The scheduler instance where the value will output. |
initialValue | Func | The function that provides the initial value. |
Returns: IValueBinder
4. Overload¶
public static IValueBinder<T> AsLazyValue<T>(this IObservable<T> source, Action<T?> onChanging, Action<T?> onChanged, Func<T> initialValue)
Summary: Projects an observable value to a property for binding. This value is lazy and will not subscribe until first access.
Type parameters
| Name | Description |
|---|---|
T | The property type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source observable. |
onChanging | Action | Callback with the changing value. |
onChanged | Action | Callback with the changed value. |
initialValue | Func | The function that provides the initial value. |
Returns: IValueBinder
5. Overload¶
public static IValueBinder<T> AsLazyValue<T>(this IObservable<T> source, Action<T?> onChanging, Action<T> onChanged, IScheduler scheduler, Func<T> initialValue)
Summary: Projects an observable value to a property for binding. This value is lazy and will not subscribe until first access.
Type parameters
| Name | Description |
|---|---|
T | The property type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source observable. |
onChanging | Action | Callback with the changing value. |
onChanged | Action | Callback with the changed value. |
scheduler | [IScheduler](# | The scheduler instance where the value will output. |
initialValue | Func | The function that provides the initial value. |
Returns: IValueBinder