Table of Contents

Interface IParameterResolver

Namespace
Blazing.Mvvm.Components
Assembly
Blazing.Mvvm.dll

Defines a mechanism for resolving and setting parameters on a target View and its ViewModel in a Blazor MVVM application.

public interface IParameterResolver

Methods

SetParameters<TView, TViewModel>(TView, TViewModel, in ParameterView)

Sets the parameters from the given Microsoft.AspNetCore.Components.ParameterView on both the specified view and its viewModel.

bool SetParameters<TView, TViewModel>(TView view, TViewModel viewModel, in ParameterView parameters) where TView : IView<TViewModel> where TViewModel : IViewModelBase

Parameters

view TView

The view on which to set the parameters.

viewModel TViewModel

The ViewModel on which to set the parameters.

parameters ParameterView

The parameters to set on the View and ViewModel.

Returns

bool

true if the parameters were set successfully; otherwise, false. Returns false if the ParameterResolutionMode is set to None or is not a valid value; otherwise, returns true.

Type Parameters

TView

The type of the View. Must implement IView<TViewModel>.

TViewModel

The type of the ViewModel. Must implement IViewModelBase.

Exceptions

ArgumentNullException

Thrown when view or viewModel is null.