MelbourneDeveloper / RestClient.Net

.NET REST Client Framework for all platforms
MIT License
366 stars 43 forks source link

Overload for dependency injection that accepts Action<CreateClientOptons, IServiceProvider> #99

Closed DrLeh closed 2 years ago

DrLeh commented 2 years ago

Untested, created via github web ui and thus without an IDE to validate that this compiles. See #98

MelbourneDeveloper commented 2 years ago

@DrLeh I'll try to get this into a release this weekend if possible. I'll have to go through a few more tests first.

DrLeh commented 2 years ago

I was on vacation this week so I didn't have a lot of time to refine and test my idea to see how id make this library work in my application. So no rush, thanks

MelbourneDeveloper commented 2 years ago

@DrLeh ok, I've cleaned all this up in a new branch and it's looking good.

But, I added a new overload for backwards compatibility and a test for that, but the test fails. If you can figure out why this test fails, I will be able to put the PR through.

https://github.com/MelbourneDeveloper/RestClient.Net/blob/dda9d3590a8df3c00f61de7f0b0303eb412bbdde/src/RestClient.Net.UnitTests/MicrosoftDependencyInjectionTests.cs#L34

MelbourneDeveloper commented 2 years ago

Hi @DrLeh . Did you ever get a chance to look at the branch?

DrLeh commented 2 years ago

Hey @MelbourneDeveloper I actually found a different library that I've been using so I haven't gotten back to this and don't intend to. Sorry about that!