Class HostingServices
Provides methods for configuring AMI host in DI environment.
Inherited Members
Namespace: DotNext.Maintenance.CommandLine
Assembly: DotNext.MaintenanceServices.dll
Syntax
public static class HostingServices
Methods
| Edit this page View SourceRegisterDefaultMaintenanceCommands(IServiceCollection)
Registers default commands.
Declaration
public static IServiceCollection RegisterDefaultMaintenanceCommands(this IServiceCollection services)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | A registry of services. |
Returns
Type | Description |
---|---|
IServiceCollection | A modified registry of services. |
See Also
| Edit this page View SourceRegisterMaintenanceCommand(IServiceCollection, string, Action<ApplicationMaintenanceCommand>)
Registers maintenance command.
Declaration
public static IServiceCollection RegisterMaintenanceCommand(this IServiceCollection services, string name, Action<ApplicationMaintenanceCommand> action)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | A registry of services. |
string | name | The name of the command. |
Action<ApplicationMaintenanceCommand> | action | The action that can be used to initialize the command. |
Returns
Type | Description |
---|---|
IServiceCollection | A modified registry of services. |
RegisterMaintenanceCommand<TDependency>(IServiceCollection, string, Action<ApplicationMaintenanceCommand, TDependency>)
Registers maintenance command.
Declaration
public static IServiceCollection RegisterMaintenanceCommand<TDependency>(this IServiceCollection services, string name, Action<ApplicationMaintenanceCommand, TDependency> action) where TDependency : notnull
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | A registry of services. |
string | name | The name of the command. |
Action<ApplicationMaintenanceCommand, TDependency> | action | The action that can be used to initialize the command. |
Returns
Type | Description |
---|---|
IServiceCollection | A modified registry of services. |
Type Parameters
Name | Description |
---|---|
TDependency | The command initialization dependency. |
RegisterMaintenanceCommand<TDependency1, TDependency2>(IServiceCollection, string, Action<ApplicationMaintenanceCommand, TDependency1, TDependency2>)
Registers maintenance command.
Declaration
public static IServiceCollection RegisterMaintenanceCommand<TDependency1, TDependency2>(this IServiceCollection services, string name, Action<ApplicationMaintenanceCommand, TDependency1, TDependency2> action) where TDependency1 : notnull where TDependency2 : notnull
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | A registry of services. |
string | name | The name of the command. |
Action<ApplicationMaintenanceCommand, TDependency1, TDependency2> | action | The action that can be used to initialize the command. |
Returns
Type | Description |
---|---|
IServiceCollection | A modified registry of services. |
Type Parameters
Name | Description |
---|---|
TDependency1 | The first dependency required for command initialization. |
TDependency2 | The second dependency required for command initialization. |
RegisterMaintenanceCommand<TDependency1, TDependency2, TDependency3>(IServiceCollection, string, Action<ApplicationMaintenanceCommand, TDependency1, TDependency2, TDependency3>)
Registers maintenance command.
Declaration
public static IServiceCollection RegisterMaintenanceCommand<TDependency1, TDependency2, TDependency3>(this IServiceCollection services, string name, Action<ApplicationMaintenanceCommand, TDependency1, TDependency2, TDependency3> action) where TDependency1 : notnull where TDependency2 : notnull where TDependency3 : notnull
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | A registry of services. |
string | name | The name of the command. |
Action<ApplicationMaintenanceCommand, TDependency1, TDependency2, TDependency3> | action | The action that can be used to initialize the command. |
Returns
Type | Description |
---|---|
IServiceCollection | A modified registry of services. |
Type Parameters
Name | Description |
---|---|
TDependency1 | The first dependency required for command initialization. |
TDependency2 | The second dependency required for command initialization. |
TDependency3 | The third dependency required for command initialization. |
UseApplicationMaintenanceInterface(IServiceCollection, string)
Enables Application Maintenance Interface.
Declaration
public static IServiceCollection UseApplicationMaintenanceInterface(this IServiceCollection services, string unixDomainSocketPath)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | A registry of services. |
string | unixDomainSocketPath | The path to the interaction point represented by Unix Domain Socket. |
Returns
Type | Description |
---|---|
IServiceCollection | A modified registry of services. |
UseApplicationStatusProvider<TProvider>(IServiceCollection)
Registers IApplicationStatusProvider as a singleton service and exposes access via Application Maintenance Interface.
Declaration
public static IServiceCollection UseApplicationStatusProvider<TProvider>(this IServiceCollection services) where TProvider : class, IApplicationStatusProvider
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | A registry of services. |
Returns
Type | Description |
---|---|
IServiceCollection | A modified registry of services. |
Type Parameters
Name | Description |
---|---|
TProvider | The type implementing IApplicationStatusProvider. |