.NET Core Dependency Injection – The Booster Jab - Steve Collins - NDC London 2021

preview_player
Показать описание
With the releases of .NET Core 2.x, 3.x and now.NET 5, more developers have now got to grips with the basics of using the default Microsoft Dependency Injection container that comes with .NET Core. However, the story does not end there...

This talk will take you beyond the basics and cover more complex topics such as

* Avoiding unintended multiple registrations
* Conflicts between service lifetimes
* Understanding the Root and Scoped service providers
* Automated service registration packages
* Registering and resolving open generics, classes with multiple interfaces; and interfaces with multiple class implementation
* Integrating with other DI containers
* Key named registrations are not supported ... but I need it!
* Getting better startup performance from your registered services
* Thread safety and avoiding memory leaks
* Validating and unit testing your service registrations

The talk assumes that you have already had an initial dose of DI knowledge and are now ready for a top-up to avoid some nasty bugs.
Рекомендации по теме
Комментарии
Автор

Scrutor also provides a helper to allow decorators, and you can then just use the interface as constructor parameter!

Sebazzz