Added fluent api for microsoft-esque dependency registration#38
Added fluent api for microsoft-esque dependency registration#38tofi92 wants to merge 1 commit intof1ana:masterfrom
Conversation
|
Interesting idea! This could make registration a more intuitive. |
|
As HttpClient is also a transient dependency, I think there is no benefit for the services to be scoped, because the most costly resource, the HttpClient, will be created everytime regardless. |
The IHttpClientFactory, which generates the HttpClients, is a singleton correct? |
|
Ahh I misremembered and thought HttpClient was used :) Anyway I think it won't make a difference. |
Hi, I added a small fluent API for the default Microsoft DI container. This should be familiar to any C# developer using the default DI container.
It is 100% backwards compatible, so manual registration still works - this is reflected in the README.