Show / Hide Table of Contents

Class HostingServices

Provides methods for configuring AMI host in DI environment.

Inheritance
object
HostingServices
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DotNext.Maintenance.CommandLine
Assembly: DotNext.MaintenanceServices.dll
Syntax
public static class HostingServices

Methods

| Edit this page View Source

RegisterDefaultMaintenanceCommands(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
GetDefaultCommands()
| Edit this page View Source

RegisterMaintenanceCommand(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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾