From ae0fae74b16a93f96979abed33e715f0a34007f6 Mon Sep 17 00:00:00 2001 From: pengjuyan <42963214+codding-y@users.noreply.github.com> Date: Thu, 23 Feb 2023 15:32:16 +0800 Subject: [PATCH] fix: change AddMasaStackConfig to AddMasaStackConfigAsync (#467) Co-authored-by: yanpengju --- .../ServiceCollectionExtensions.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Contrib/StackSdks/Masa.Contrib.StackSdks.Config/ServiceCollectionExtensions.cs b/src/Contrib/StackSdks/Masa.Contrib.StackSdks.Config/ServiceCollectionExtensions.cs index 9fc2c3051..9afee27f0 100644 --- a/src/Contrib/StackSdks/Masa.Contrib.StackSdks.Config/ServiceCollectionExtensions.cs +++ b/src/Contrib/StackSdks/Masa.Contrib.StackSdks.Config/ServiceCollectionExtensions.cs @@ -62,11 +62,11 @@ await configurationApiManage.AddAsync( } } - public static IServiceCollection AddMasaStackConfig(this IServiceCollection services, bool init = false) + public static async Task AddMasaStackConfigAsync(this IServiceCollection services, bool init = false) { if (init) { - InitializeMasaStackConfiguration(services).ConfigureAwait(false); + await InitializeMasaStackConfiguration(services).ConfigureAwait(false); } services.TryAddScoped(serviceProvider => @@ -78,13 +78,13 @@ public static IServiceCollection AddMasaStackConfig(this IServiceCollection serv return services; } - public static IServiceCollection AddMasaStackConfig(this IServiceCollection services, DccOptions dccOptions, bool init = false) + public static async Task AddMasaStackConfigAsync(this IServiceCollection services, DccOptions dccOptions, bool init = false) { services.AddMasaConfiguration(builder => builder.UseDcc(dccOptions)); if (init) { - InitializeMasaStackConfiguration(services).ConfigureAwait(false); + await InitializeMasaStackConfiguration(services).ConfigureAwait(false); } services.TryAddScoped(serviceProvider =>