Class ViewModelDefinitionAttribute<TViewModel>
- Namespace
- Blazing.Mvvm.ComponentModel
- Assembly
- Blazing.Mvvm.Base.dll
Specifies metadata for a generic ViewModel to control its registration in the dependency injection container.
Supports configuration of service lifetime, optional keyed registration, and DI registration for a specific service type.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class ViewModelDefinitionAttribute<TViewModel> : ViewModelDefinitionAttribute, IViewModelGenericAttributeDefinition where TViewModel : IViewModelBaseType Parameters
TViewModel-
The type the
ViewModelimplements that should be used for DI registration. Must implement IViewModelBase.
Inheritance
Implements
Inherited Members
Properties
ViewModelType
Gets the service type used for DI registration. This is the type specified by TViewModel.
public Type ViewModelType { get; }