-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make IAsyncConfigureOptions<TOptions>behave similar to IConfigureOptions<TOptions> #15165
Comments
@Piedone I do not disagree with the request. I always thought the .net framework should have async support with In our case, almost all the calls to |
I guess not much news on this from since 2018, when it was "we are not going to implement this at this time". This might be more impactful if you (as we discussed under #15089) run an app with many tenants that are periodically shut down, resulting in frequent shell starts. This is the case of a SaaS. |
yes which is why I do not disagree with you. But, before you go down that rabbit hole, it may worth understanding why they said " |
@Piedone I submitted an issue dotnet/runtime#97575 to see what information would we get back. Please chime in there if you have more reasons why they should support async configuration in the framework. |
Great, thanks, watching it. I have nothing to add, since you explained it, but I'll chime in if necessary. |
Is your feature request related to a problem? Please describe.
While the name suggests it,
IAsyncConfigureOptions<TOptions>
is not the async equivalent ofIConfigureOptions<TOptions>
, since it works slightly differently: it allows you to injectTOptions
, notIOptions<TOptions>
.Related: #15125.
Describe the solution you'd like
Make it more similar by adding an
IAsyncOptions<T>
type to inject, withGetValueAsync()
. This would otherwise work the same asIOptions<T>
and itsValue
property.Describe alternatives you've considered
Rename the service, to like
IAsyncConfigurationProvider
and in its interface docs emphasize the similarity but differences toIConfigureOptions<TOptions>
.The text was updated successfully, but these errors were encountered: