Skip to content
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

Merged
merged 7 commits into from Dec 2, 2023
Merged

IAsyncConfigureOptions #14759

merged 7 commits into from Dec 2, 2023

Conversation

jtkech
Copy link
Member

@jtkech jtkech commented Nov 27, 2023

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 and IAsyncConfigureOptions<TOptions>, and a services configure helper.

For example in the following, BlobOptions will be registered once as a singleton and configured asynchronously once by BlobOptionsSetup.ConfigureAsync() just after a tenant container is created.

        services.Configure<BlobOptions, BlobOptionsSetup>()

@MikeAlhayek If you can try this version when you will have time.

Copy link
Member

@MikeAlhayek MikeAlhayek left a 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

Copy link
Member

@MikeAlhayek MikeAlhayek left a 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!

@jtkech jtkech merged commit 775d7cb into main Dec 2, 2023
3 checks passed
@jtkech jtkech deleted the jtkech/async-config branch December 2, 2023 06:24
urbanit pushed a commit to urbanit/OrchardCore that referenced this pull request Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants