Background:
The current implementation of IBackgroundServiceHealthService uses a string (serviceName) to register and manage the health check state of a background service. As the background services are registered as singletons, we can use the type to make a unique service name.
Proposed Changes:
- Implement
IBackgroundServiceHealthService<TBackgroundService> that utilizes the type TBackgroundService to create a unique name to call into IBackgroundServiceHealthService.
Impact:
- Increased ease of use as we reduce the boilerplate of finding the
serviceName for each call.
- Reduced chance of errors as the call can be made more consistent.
- Added complexity for service registration of
IBackgroundServiceHealthService<TBackgroundService>
Background:
The current implementation of
IBackgroundServiceHealthServiceuses a string (serviceName) to register and manage the health check state of a background service. As the background services are registered as singletons, we can use the type to make a unique service name.Proposed Changes:
IBackgroundServiceHealthService<TBackgroundService>that utilizes the typeTBackgroundServiceto create a unique name to call intoIBackgroundServiceHealthService.Impact:
serviceNamefor each call.IBackgroundServiceHealthService<TBackgroundService>