Replies: 1 comment 10 replies
What's calling GetService and to resolve what? |
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
To build my
IChatClientI need to get credentials with a HTTP call, something like thisI would like to avoid that sync-over-async, especially that I have a use-case where the secret depends on the request so the
IChatClientis registered as scoped.One work-around that I tried is to have a custom
IChatClientthat fetches the credentials inGetResponseAsyncso the initialization is justThe problem is that the first method that will be called is
IChatClient.GetServicewhich is synchronous so the sync-over-async is not avoided.What is the recommended way to achieve that?
All reactions