Class EndpointServiceCollectionExtensions
- Namespace
- Steeltoe.Management.Endpoint.Actuators.Health
- Assembly
- Steeltoe.Management.Endpoint.dll
public static class EndpointServiceCollectionExtensions
- Inheritance
-
EndpointServiceCollectionExtensions
- Inherited Members
Methods
AddHealthActuator(IServiceCollection)
Adds the health actuator to the service container and configures the ASP.NET Core middleware pipeline.
public static IServiceCollection AddHealthActuator(this IServiceCollection services)
Parameters
servicesIServiceCollectionThe IServiceCollection to add services to.
Returns
- IServiceCollection
The incoming
servicesso that additional calls can be chained.
AddHealthActuator(IServiceCollection, bool)
Adds the health actuator to the service container.
public static IServiceCollection AddHealthActuator(this IServiceCollection services, bool configureMiddleware)
Parameters
servicesIServiceCollectionThe IServiceCollection to add services to.
configureMiddlewareboolWhen
false, skips configuration of the ASP.NET Core middleware pipeline. While this provides full control over the pipeline order, it requires manual addition of the appropriate middleware for actuators to work correctly.
Returns
- IServiceCollection
The incoming
servicesso that additional calls can be chained.
AddHealthContributor(IServiceCollection, Type)
Adds the specified IHealthContributor to the D/I container as a scoped service.
public static IServiceCollection AddHealthContributor(this IServiceCollection services, Type healthContributorType)
Parameters
servicesIServiceCollectionThe IServiceCollection to add services to.
healthContributorTypeTypeThe type of the health contributor to add.
Returns
- IServiceCollection
The incoming
servicesso that additional calls can be chained.
AddHealthContributor<T>(IServiceCollection)
Adds the specified IHealthContributor to the D/I container as a scoped service.
public static IServiceCollection AddHealthContributor<T>(this IServiceCollection services) where T : class, IHealthContributor
Parameters
servicesIServiceCollectionThe IServiceCollection to add services to.
Returns
- IServiceCollection
The incoming
servicesso that additional calls can be chained.
Type Parameters
TThe type of health contributor to add.