Table of Contents

Class OneWayBindingOnOneOrTwoWayBind<TViewModel, TViewProp>

Namespace
Vetuviem.Core
Assembly
Vetuviem.Core.dll

Represents a One Way Bind to a property that takes One or Two way binding.

public class OneWayBindingOnOneOrTwoWayBind<TViewModel, TViewProp> : IOneOrTwoWayBind<TViewModel, TViewProp> where TViewModel : class

Type Parameters

TViewModel

The type for the ViewModel.

TViewProp

The type for the View Property.

Inheritance
OneWayBindingOnOneOrTwoWayBind<TViewModel, TViewProp>
Implements
IOneOrTwoWayBind<TViewModel, TViewProp>
Inherited Members

Constructors

OneWayBindingOnOneOrTwoWayBind(Expression<Func<TViewModel, TViewProp?>>, Func<TViewProp?, TViewProp>)

Initializes a new instance of the OneWayBindingOnOneOrTwoWayBind<TViewModel, TViewProp> class.

public OneWayBindingOnOneOrTwoWayBind(Expression<Func<TViewModel, TViewProp?>> viewModelBinding, Func<TViewProp?, TViewProp> vmToViewConverter)

Parameters

viewModelBinding Expression<Func<TViewModel, TViewProp>>

Expression for the View Model binding.

vmToViewConverter Func<TViewProp, TViewProp>

Function for converting the ViewModel property to the type of the View Property.

Methods

ApplyBinding<TView>(Action<IDisposable>, TView, TViewModel, Expression<Func<TView, TViewProp>>)

Applies a View to View Model Binding.

public void ApplyBinding<TView>(Action<IDisposable> d, TView view, TViewModel viewModel, Expression<Func<TView, TViewProp>> viewBinding) where TView : class, IViewFor<TViewModel>

Parameters

d Action<IDisposable>

The disposable action registration. Used to clean up when bindings fall out of scope.

view TView

The instance of the View to bind.

viewModel TViewModel

The instance of the ViewModel to Bind.

viewBinding Expression<Func<TView, TViewProp>>

Expression of the View Property to Bind to.

Type Parameters

TView

The type for the view.

ApplyBinding<TView>(CompositeDisposable, TView, TViewModel, Expression<Func<TView, TViewProp>>)

Applies a View to View Model Binding.

public void ApplyBinding<TView>(CompositeDisposable compositeDisposable, TView view, TViewModel viewModel, Expression<Func<TView, TViewProp>> viewBinding) where TView : class, IViewFor<TViewModel>

Parameters

compositeDisposable CompositeDisposable

The disposable action registration. Used to clean up when bindings fall out of scope.

view TView

The instance of the View to bind.

viewModel TViewModel

The instance of the ViewModel to Bind.

viewBinding Expression<Func<TView, TViewProp>>

Expression of the View Property to Bind to.

Type Parameters

TView

The type for the view.