Open bsak2003 opened 4 years ago
Also, services loaded in this way should have deactivation switch ('enabled' property), like:
"Services": {
"SampleService": {
"enabled": true,
"property": "value"
}
}
This interface will allow DependencyInjection to automatically invoke all compatible DependencyInjectors.
public interface IDependencyInjector
{
public void Add(IServiceCollection services, IConfiguration configuration);
public void Use(IApplicationBuilder app, IConfiguration configuration);
}
We need a way to simplify the Dependency Injection process, such as attribute [Inject] to automatically inject dependencies.