Skip to content

Commit

Permalink
Updated to use Blazored in DI & fixed some DI issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
mumby0168 committed Oct 31, 2021
1 parent f066fb7 commit bab3daa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class Program
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });

builder.Services.AddAuthorizationCore();
builder.Services.AddBlazorAzureStaticWebApp();
builder.Services.AddBlazoredAzureStaticWebApp();

await builder.Build().RunAsync();
}
Expand Down
2 changes: 1 addition & 1 deletion samples/BlazorWebAssembly/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static async Task Main(string[] args)
{ BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });

builder.Services.AddAuthorizationCore();
builder.Services.AddBlazorAzureStaticWebApp();
builder.Services.AddBlazoredAzureStaticWebApp();

await builder.Build().RunAsync();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ namespace Blazored.AzureStaticWebAppAuthentication.Extensions
{
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddBlazorAzureStaticWebApp(this IServiceCollection services) =>
public static IServiceCollection AddBlazoredAzureStaticWebApp(this IServiceCollection services) =>
services
.AddScoped<IAzureStaticWebAppNavigationService, AzureStaticWebAppNavigationService>()
.AddScoped<AuthenticationStateProvider, AzureStaticWebAppAuthenticationStateProvider>()
.AddScoped<IAzureStaticWebAppUserProvider, AzureStaticWebAppUserProvider>();
.AddScoped<IAzureStaticWebAppUserProvider, AzureStaticWebAppUserProvider>()
.AddScoped<IAzureStaticWebAppLoginProvider, AzureStaticWebAppNavigationService>()
.AddScoped<IAzureStaticWebAppNavigator, AzureStaticWebAppNavigationService>();
}
}

0 comments on commit bab3daa

Please sign in to comment.