Skip to content

Commit

Permalink
fix: change AddMasaStackConfig to AddMasaStackConfigAsync (#467)
Browse files Browse the repository at this point in the history
Co-authored-by: yanpengju <[email protected]>
  • Loading branch information
codding-y and yanpengju authored Feb 23, 2023
1 parent a11f2ce commit ae0fae7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ await configurationApiManage.AddAsync(
}
}

public static IServiceCollection AddMasaStackConfig(this IServiceCollection services, bool init = false)
public static async Task<IServiceCollection> AddMasaStackConfigAsync(this IServiceCollection services, bool init = false)
{
if (init)
{
InitializeMasaStackConfiguration(services).ConfigureAwait(false);
await InitializeMasaStackConfiguration(services).ConfigureAwait(false);
}

services.TryAddScoped<IMasaStackConfig>(serviceProvider =>
Expand All @@ -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<IServiceCollection> 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<IMasaStackConfig>(serviceProvider =>
Expand Down

0 comments on commit ae0fae7

Please sign in to comment.