Table of Contents

Class AbpApplicationBase

Namespace
Volo.Abp
Assembly
Volo.Abp.Core.dll
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

string

InstanceId

A unique identifier for this application instance. This value changes whenever the application is restarted.

public string InstanceId { get; }

Property Value

string

Modules

public IReadOnlyList<IAbpModuleDescriptor> Modules { get; }

Property Value

IReadOnlyList<IAbpModuleDescriptor>

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

IServiceProvider

Services

List of all service registrations. Can not add new services to this collection after application initialize.

public IServiceCollection Services { get; }

Property Value

IServiceCollection

StartupModuleType

Type of the startup (entrance) module of the application.

public Type StartupModuleType { get; }

Property Value

Type

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

Task

Dispose()

public virtual void Dispose()

InitializeModules()

protected virtual void InitializeModules()

InitializeModulesAsync()

protected virtual Task InitializeModulesAsync()

Returns

Task

LoadModules(IServiceCollection, AbpApplicationCreationOptions)

protected virtual IReadOnlyList<IAbpModuleDescriptor> LoadModules(IServiceCollection services, AbpApplicationCreationOptions options)

Parameters

services IServiceCollection
options AbpApplicationCreationOptions

Returns

IReadOnlyList<IAbpModuleDescriptor>

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

Task

WriteInitLogs(IServiceProvider)

protected virtual void WriteInitLogs(IServiceProvider serviceProvider)

Parameters

serviceProvider IServiceProvider