Interface IModule
- Namespace
- Crystal.Avalonia
- Assembly
- Crystal.Avalonia.dll
Defines an application module, which is a self-contained unit of functionality. Modules allow you to organize your application into independent feature areas, each managing its own services and views.
public interface IModule
Methods
InitializeModule(IServiceProvider)
Override this method to perform module initialization logic.
At this point, all services have been registered and can be resolved from serviceProvider.
void InitializeModule(IServiceProvider serviceProvider)
Parameters
serviceProviderIServiceProviderThe service provider, can be used to resolve services registered in this module.
RegisterServices(IServiceCollection)
Override this method to register services that belong to this module. It is recommended to use AddMvvmTransient<TView, TViewModel>(IServiceCollection) or AddMvvmSingleton<TView, TViewModel>(IServiceCollection) to register View/ViewModel pairs.
void RegisterServices(IServiceCollection services)
Parameters
servicesIServiceCollectionThe service collection to register services into.