question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"AddRestEaseClient" could register multiple interfaces for the same configuration?

See original GitHub issue

Hi, Is there a way that AddRestEaseClient could register multiple interfaces, something like:

.AddRestEaseClientMultiple()
    .Add<IAdminClient>()
    .Add<IStorePublic>()
   // all having the same configuration
    .Close()  // now returns to IHttpClientBuilder
.ConfigureHttpClient((service, client) => client.BaseAddress = Program.basePath)
.AddHttpMessageHandler<BaseAddressAuthorizationMessageHandler>();

Thank you for your time

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
canton7commented, Feb 10, 2021

Reopening, as I think this is probably something worth implementing.

0reactions
canton7commented, Feb 13, 2021

This issue won’t be relevant to you if you’re configuring a RestEase interface after constructing it, before returning it. It’s just about if you’re using HttpClientFactory and IServiceProvider.

If you’ve got other questions, please open another issue. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to register a service with multiple interfaces in ASP. ...
In this post I describe how to register a concrete class with multiple public interfaces in the Microsoft.Extensions.
Read more >
RestEase
At some point, I'd like to move to RestEase 2. There are two main ... "AddRestEaseClient" could register multiple interfaces for the same...
Read more >
Register same implementation for multiple interfaces
I end up with two instances that could be resolved using IAwesome<Thing> and IAwesomeThing , which allows to run 2*N operations. I definitely ......
Read more >
Multiple implementations of same interface - the options
Different methods of registering the same interface with multiple implementations using .NET dependency injection · The challenge · The problem ...
Read more >
RestEase 1.5.2
Easy-to-use typesafe REST API client library, which is simple and customisable. Write a C# interface which describes your API, and RestEase ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found