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
IAsyncConfigureOptions #14759
IAsyncConfigureOptions #14759
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtkech I had similar thought as well. This is great. I'll test it out tomorrow. We should use this with every configuration class that use ISiteService. Good work
src/OrchardCore.Modules/OrchardCore.DataProtection.Azure/BlobOptionsSetup.cs
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.Abstractions/Shell/Builders/Extensions/IAsyncConfigureOptions.cs
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.Abstractions/Shell/Builders/Extensions/IAsyncOptions.cs
Show resolved
Hide resolved
...rchardCore/OrchardCore.Abstractions/Shell/Builders/Extensions/ServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
...rchardCore/OrchardCore.Abstractions/Shell/Builders/Extensions/ServiceCollectionExtensions.cs
Show resolved
Hide resolved
...rchardCore/OrchardCore.Abstractions/Shell/Builders/Extensions/ServiceCollectionExtensions.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtkech this works as expected!
Recently we found a way to configure asynchronously the Azure Data Protection.
Here we provide a more global way so that it can be used in other places, this by introducing
IAsyncOptions
andIAsyncConfigureOptions<TOptions>
, and a services configure helper.For example in the following,
BlobOptions
will be registered once as a singleton and configured asynchronously once byBlobOptionsSetup.ConfigureAsync()
just after a tenant container is created.@MikeAlhayek If you can try this version when you will have time.