TaskHub.Shared.Refactoring is an internal infrastructure module that provides a lightweight reflection-based approach for resolving and registering dependencies, as well as collecting
basic service metadata. This module is intentionally opinionated, minimal, and non-universal.
The module solves a narrow set of problems:
ServiceInfo source.The module scans application assemblies to discover user-defined interfaces and their concrete implementations. System and vendor assemblies are excluded by default to:
The module supports two explicit dependency resolution modes. The chosen mode is defined by the bootstrap call site, not by the module itself.
services.AddAppDependency<T>();
This call scans assemblies for interface T and its single implementation, registering the pair in the DI container.
Use this method when:
services.AddAppDependencies<T>();
Resolves and registers all matching implementations, registering them in the DI container. Use this method when multiple implementations are expected and valid.
A centralized service information provider. Contains metadata from the entry assembly and the current runtime environment. Options:
AppDomain.CurrentDomain.FriendlyName.unknown.The constructed ServiceInfo instance is registered as a singleton in IServiceCollection.
services.AddServiceInfo();