Class AbpApplicationBase
public abstract class AbpApplicationBase : IAbpApplication, IModuleContainer, IApplicationInfoAccessor, IDisposable
- Inheritance
-
AbpApplicationBase
- Implements
- Inherited Members
- Extension Methods
Properties
ApplicationName
Name of the application. This is useful for systems with multiple applications, to distinguish resources of the applications located together.
public string? ApplicationName { get; }
Property Value
InstanceId
A unique identifier for this application instance. This value changes whenever the application is restarted.
public string InstanceId { get; }
Property Value
Modules
public IReadOnlyList<IAbpModuleDescriptor> Modules { get; }
Property Value
ServiceProvider
Reference to the root service provider used by the application. This can not be used before initializing the application.
public IServiceProvider ServiceProvider { get; }
Property Value
Services
List of all service registrations. Can not add new services to this collection after application initialize.
public IServiceCollection Services { get; }
Property Value
StartupModuleType
Type of the startup (entrance) module of the application.
public Type StartupModuleType { get; }
Property Value
Methods
ConfigureServices()
public virtual void ConfigureServices()
ConfigureServicesAsync()
Calls the Pre/Post/ConfigureServicesAsync methods of the modules. If you use this method, you must have set the SkipConfigureServices option to true before.
public virtual Task ConfigureServicesAsync()
Returns
Dispose()
public virtual void Dispose()
InitializeModules()
protected virtual void InitializeModules()
InitializeModulesAsync()
protected virtual Task InitializeModulesAsync()
Returns
LoadModules(IServiceCollection, AbpApplicationCreationOptions)
protected virtual IReadOnlyList<IAbpModuleDescriptor> LoadModules(IServiceCollection services, AbpApplicationCreationOptions options)
Parameters
services
IServiceCollectionoptions
AbpApplicationCreationOptions
Returns
SetServiceProvider(IServiceProvider)
protected virtual void SetServiceProvider(IServiceProvider serviceProvider)
Parameters
serviceProvider
IServiceProvider
Shutdown()
Used to gracefully shutdown the application and all modules.
public virtual void Shutdown()
ShutdownAsync()
Used to gracefully shutdown the application and all modules.
public virtual Task ShutdownAsync()
Returns
WriteInitLogs(IServiceProvider)
protected virtual void WriteInitLogs(IServiceProvider serviceProvider)
Parameters
serviceProvider
IServiceProvider