Table of Contents

Class ViewModelRegistry

Namespace
Dmnk.Blazor.Mvvm
Assembly
Dmnk.Blazor.Mvvm.dll
public class ViewModelRegistry : IViewModelRegistry
Inheritance
ViewModelRegistry
Implements
Inherited Members

Constructors

ViewModelRegistry(IEnumerable<ViewModelRegistration>, ILogger<ViewModelRegistry>?)

public ViewModelRegistry(IEnumerable<ViewModelRegistration> registrations, ILogger<ViewModelRegistry>? log = null)

Parameters

registrations IEnumerable<ViewModelRegistration>
log ILogger<ViewModelRegistry>

Methods

GetViewForViewModelDynamic(Type)

Like GetViewForViewModel<TViewModel>(TViewModel), but accepts a Type parameter instead of an instance.

public Type? GetViewForViewModelDynamic(Type viewModelType)

Parameters

viewModelType Type

Returns

Type

GetViewForViewModel<TViewModel>(TViewModel)

Retrieves the registered View type for a given ViewModel type, or null if no registration exists.

public Type? GetViewForViewModel<TViewModel>(TViewModel viewModel) where TViewModel : INotifyPropertyChanged

Parameters

viewModel TViewModel

Returns

Type

Type Parameters

TViewModel