Class ServicesExtension
- Namespace
- Blazing.Mvvm
- Assembly
- Blazing.Mvvm.dll
Provides extension methods for IServiceCollection to add the required services for Blazing.Mvvm.
public static class ServicesExtensionInheritance
Methods
AddMvvm(IServiceCollection, Action<LibraryConfiguration>?)
Adds the required services for Blazing.Mvvm to the specified IServiceCollection.
public static IServiceCollection AddMvvm(this IServiceCollection services, Action<LibraryConfiguration>? configuration = null)Parameters
servicesIServiceCollection-
The IServiceCollection instance to add services to.
configurationAction<LibraryConfiguration>?-
An optional action to configure the LibraryConfiguration.
Returns
- IServiceCollection
-
The IServiceCollection instance for chaining.
Exceptions
- ArgumentNullException
-
Thrown when
servicesis null. - ArgumentOutOfRangeException
-
Thrown when HostingModelType is not within the defined range.
- InvalidOperationException
-
Thrown when a view model has a generic ViewModelDefinitionAttribute<TViewModel> attribute but does not implement the generic type.