DalSoft / DalSoft.RestClient

The C# REST Client - the only REST/ HTTP Client you will ever need
https://restclient.dalsoft.io
MIT License
218 stars 43 forks source link

Autofac integration #107

Closed userjeff3 closed 1 week ago

userjeff3 commented 2 years ago

Can IRestClientFactory be registered with Autofac? This would be for backend applications, no ASP, so no controllers, etc.

DalSoft commented 2 years ago

IRestClientFactory does work without ASP.NET, I don't really use AutoFac but you should be able to set it up as described here just swap IHttpClientFactory with IHttpRestClientFactory.

nhaberl commented 1 year ago

@DalSoft would be of great value to extend your docs with DI setup of different container software like autofac and SimpleInjector ... So we would have to register IHttpRestClientFactory with HttpClientFactory and how to continue ? (Independent of ASP.NET Core)

DalSoft commented 1 week ago

Happy to take PR's for the documentation. But I won't be adding extra DI examples as most people use .NET DI.