DepencyInjectionExtension
1.0.0
Biblioteca leve no padrão .NET para injeção de dependência
NUGET: https://www.nuget.org/packages/dependencyinjection.extensions/
Exemplo:
[ TransientDependency ( typeof ( IService ) ) ]
public class Service : IService
{
public Service ( )
{
}
} Formato: [<AttribuleLyfeCycle>(typeof(<InterfaceType>))]
InjectAllServices como Mostrar o trecho de código abaixo: public void ConfigureServices ( IServiceCollection services )
{
services . AddMvc ( ) . SetCompatibilityVersion ( CompatibilityVersion . Version_2_2 ) ;
services . InjectAllServices ( ) ;
}