关于[C# Delegates with IoC Containers and Dependency Injection]的摘要:
Developers are usually encouraged to do dependency injection with interfaces. Some developers don’t know that they can do dependency injection with delegates, and there are good reasons to do this. Moreover, developers can use delegates with modern IoC containers like ASP.NET Core’s IoC container, mock delegates, and verify calls. It is good practice and should be encouraged. Let’s have a look at why. All source code for this article can be found in this repo.
原文地址: https://christianfindlay.com/2020/05/15/c-delegates-with-ioc-containers-and-dependency-injection/