}},System.Func{ReactiveUI.Binding.Reactive.IInteractionContext{--2,--3},System.Threading.Tasks.Task})} }},System.Func{ReactiveUI.Binding.Reactive.IInteractionContext{--2,--3},System.IObservable{--4}})}
ReactiveUIBindingExtensions.BindInteractionUnsafe(TView, TViewModel?, Expression>>, Func, Task>) method¶
Defined in
Type: ReactiveUIBindingExtensions
Namespace: ReactiveUI.Binding.Reactive
Assembly: ReactiveUI.Binding.Reactive.dll
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-tvos18.0, net9.0-maccatalyst18.0, net9.0-ios18.0, net9.0-macos15.0, net9.0-desktop1.0, net8.0, net8.0-macos14.5, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-maccatalyst17.5, netstandard2.1, net481, net462, net471
Overloads¶
- 1.
public static IDisposable BindInteractionUnsafe<TViewModel, TView, TInput, TOutput>(this TView view, TViewModel? viewModel, Expression<Func<TViewModel, IInteraction<TInput, TOutput>>> propertyName, Func<IInteractionContext<TInput, TOutput>, Task> handler) where TViewModel : class where TView : class, IViewFor - 2.
public static IDisposable BindInteractionUnsafe<TViewModel, TView, TInput, TOutput, TDontCare>(this TView view, TViewModel? viewModel, Expression<Func<TViewModel, IInteraction<TInput, TOutput>>> propertyName, Func<IInteractionContext<TInput, TOutput>, IObservable<TDontCare>> handler) where TViewModel : class where TView : class, IViewFor
1. Overload¶
Attributes: [RequiresUnreferencedCode("Evaluates expression-based member chains via reflection; members may be trimmed.")]
public static IDisposable BindInteractionUnsafe<TViewModel, TView, TInput, TOutput>(this TView view, TViewModel? viewModel, Expression<Func<TViewModel, IInteraction<TInput, TOutput>>> propertyName, Func<IInteractionContext<TInput, TOutput>, Task> handler) where TViewModel : class where TView : class, IViewFor
Summary: Binds a task-based handler to an interaction exposed by the view model.
Type parameters
| Name | Description |
|---|---|
TViewModel | The type of the view model. |
TView | The type of the view. |
TInput | The type of the interaction's input. |
TOutput | The type of the interaction's output. |
Parameters
| Name | Type | Description |
|---|---|---|
view | TView | The view that provides the handler. |
viewModel | TViewModel? | The view model that exposes the interaction. |
propertyName | Expression | An expression that selects the interaction property on the view model. |
handler | Func | A task-based handler for the interaction. |
Returns: IDisposable -- A disposable that, when disposed, disconnects the binding.
Remarks
Resolves the property chain by reflection, for an expression the generator could not read.
2. Overload¶
Attributes: [RequiresUnreferencedCode("Evaluates expression-based member chains via reflection; members may be trimmed.")]
public static IDisposable BindInteractionUnsafe<TViewModel, TView, TInput, TOutput, TDontCare>(this TView view, TViewModel? viewModel, Expression<Func<TViewModel, IInteraction<TInput, TOutput>>> propertyName, Func<IInteractionContext<TInput, TOutput>, IObservable<TDontCare>> handler) where TViewModel : class where TView : class, IViewFor
Summary: Binds an observable-based handler to an interaction exposed by the view model.
Type parameters
| Name | Description |
|---|---|
TViewModel | The type of the view model. |
TView | The type of the view. |
TInput | The type of the interaction's input. |
TOutput | The type of the interaction's output. |
TDontCare | The signal type of the observable handler. |
Parameters
| Name | Type | Description |
|---|---|---|
view | TView | The view that provides the handler. |
viewModel | TViewModel? | The view model that exposes the interaction. |
propertyName | Expression | An expression that selects the interaction property on the view model. |
handler | Func | An observable-based handler for the interaction. |
Returns: IDisposable -- A disposable that, when disposed, disconnects the binding.
Remarks
Resolves the property chain by reflection, for an expression the generator could not read.