Class InteractionBinderImplementation
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
Provides methods to bind Interaction<TInput, TOutput>s to handlers.
public class InteractionBinderImplementation : IInteractionBinderImplementation, IEnableLogger
- Inheritance
-
InteractionBinderImplementation
- Implements
- Extension Methods
Constructors
InteractionBinderImplementation()
public InteractionBinderImplementation()
Methods
BindInteraction<TViewModel, TView, TInput, TOutput>(TViewModel?, TView, Expression<Func<TViewModel, IInteraction<TInput, TOutput>>>, Func<IInteractionContext<TInput, TOutput>, Task>)
Binds the IInteraction<TInput, TOutput> on a ViewModel to the specified handler.
public IDisposable BindInteraction<TViewModel, TView, TInput, TOutput>(TViewModel? viewModel, TView view, Expression<Func<TViewModel, IInteraction<TInput, TOutput>>> propertyName, Func<IInteractionContext<TInput, TOutput>, Task> handler) where TViewModel : class where TView : class, IViewFor
Parameters
viewModel
TViewModelThe view model to bind to.
view
TViewThe view to bind to.
propertyName
Expression<Func<TViewModel, IInteraction<TInput, TOutput>>>The name of the property on the View Model.
handler
Func<IInteractionContext<TInput, TOutput>, Task>The handler.
Returns
- IDisposable
An object that when disposed, disconnects the binding.
Type Parameters
TViewModel
The type of the view model.
TView
The type of the view being bound.
TInput
The interaction's input type.
TOutput
The interaction's output type.
BindInteraction<TViewModel, TView, TInput, TOutput, TDontCare>(TViewModel?, TView, Expression<Func<TViewModel, IInteraction<TInput, TOutput>>>, Func<IInteractionContext<TInput, TOutput>, IObservable<TDontCare>>)
Binds the IInteraction<TInput, TOutput> on a ViewModel to the specified handler.
public IDisposable BindInteraction<TViewModel, TView, TInput, TOutput, TDontCare>(TViewModel? viewModel, TView view, Expression<Func<TViewModel, IInteraction<TInput, TOutput>>> propertyName, Func<IInteractionContext<TInput, TOutput>, IObservable<TDontCare>> handler) where TViewModel : class where TView : class, IViewFor
Parameters
viewModel
TViewModelThe view model to bind to.
view
TViewThe view to bind to.
propertyName
Expression<Func<TViewModel, IInteraction<TInput, TOutput>>>The name of the property on the View Model.
handler
Func<IInteractionContext<TInput, TOutput>, IObservable<TDontCare>>The handler.
Returns
- IDisposable
An object that when disposed, disconnects the binding.
Type Parameters
TViewModel
The type of the view model.
TView
The type of the view being bound.
TInput
The interaction's input type.
TOutput
The interaction's output type.
TDontCare
The interaction's signal type.