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 IParameterResolverMethods
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 : IViewModelBaseParameters
viewTView-
The view on which to set the parameters.
viewModelTViewModel-
The ViewModel on which to set the parameters.
parametersParameterView-
The parameters to set on the View and ViewModel.
Returns
- bool
-
trueif the parameters were set successfully; otherwise,false. Returnsfalseif the ParameterResolutionMode is set to None or is not a valid value; otherwise, returnstrue.
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
vieworviewModelis null.