DepencyInjectionExtension
1.0.0
Bibliothèque légère dans la norme .NET pour l'injection de dépendance
Nuget: https://www.nuget.org/packages/dependencyInjection.extensions/
Exemple:
[ TransientDependency ( typeof ( IService ) ) ]
public class Service : IService
{
public Service ( )
{
}
} Format: [<AttribuleLyfeCycle>(typeof(<InterfaceType>))]
InjectAllServices comme affichez l'extrait de code bellow: public void ConfigureServices ( IServiceCollection services )
{
services . AddMvc ( ) . SetCompatibilityVersion ( CompatibilityVersion . Version_2_2 ) ;
services . InjectAllServices ( ) ;
}