DepencyInjectionExtension
1.0.0
Leichte Bibliothek in .NET Standard für die Abhängigkeitsinjektion
Nuget: https://www.nuget.org/packages/dependencyInjunction.extensions/
Beispiel:
[ TransientDependency ( typeof ( IService ) ) ]
public class Service : IService
{
public Service ( )
{
}
} Format: [<AttribuleLyfeCycle>(typeof(<InterfaceType>))]
InjectAllServices -Erweiterungsmethode an, um den Code -Snippet -Bellow anzeigen: public void ConfigureServices ( IServiceCollection services )
{
services . AddMvc ( ) . SetCompatibilityVersion ( CompatibilityVersion . Version_2_2 ) ;
services . InjectAllServices ( ) ;
}