Replies: 1 comment 10 replies
-
What's calling GetService and to resolve what? |
Beta Was this translation helpful? Give feedback.
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
IChatClient
I 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
IChatClient
is registered as scoped.One work-around that I tried is to have a custom
IChatClient
that fetches the credentials inGetResponseAsync
so the initialization is justThe problem is that the first method that will be called is
IChatClient.GetService
which is synchronous so the sync-over-async is not avoided.What is the recommended way to achieve that?
Beta Was this translation helpful? Give feedback.
All reactions