Добавьте файлы проекта.
This commit is contained in:
36
PlaylistShared.PWA2123/Program.cs
Normal file
36
PlaylistShared.PWA2123/Program.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
using MudBlazor.Services;
|
||||
using PlaylistShared.PWA;
|
||||
using PlaylistShared.PWA.Services;
|
||||
|
||||
internal class Program
|
||||
{
|
||||
private static async global::System.Threading.Tasks.Task Main(string[] args)
|
||||
{
|
||||
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||
builder.RootComponents.Add<App>("#app");
|
||||
builder.RootComponents.Add<HeadOutlet>("head::after");
|
||||
|
||||
builder.Services.AddMudServices();
|
||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
|
||||
|
||||
builder.Services.AddScoped<TokenStorage>();
|
||||
builder.Services.AddScoped<AuthStateProvider>();
|
||||
builder.Services.AddScoped<ApiClient>();
|
||||
|
||||
builder.Services.AddAuthorizationCore();
|
||||
builder.Services.AddCascadingAuthenticationState();
|
||||
|
||||
/*
|
||||
builder.Services.AddOidcAuthentication(options =>
|
||||
{
|
||||
// Configure your authentication provider options here.
|
||||
// For more information, see https://aka.ms/blazor-standalone-auth
|
||||
builder.Configuration.Bind("Local", options.ProviderOptions);
|
||||
});
|
||||
*/
|
||||
|
||||
await builder.Build().RunAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user