You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

32 line
1.1 KiB

  1. using Microsoft.AspNetCore.Components.Web;
  2. using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
  3. using Panel;
  4. using Services;
  5. using Blazored.LocalStorage;
  6. using System.Globalization;
  7. using AbrBlazorTools;
  8. using CurrieTechnologies.Razor.SweetAlert2;
  9. using Panel.ApiUtils;
  10. var builder = WebAssemblyHostBuilder.CreateDefault(args);
  11. builder.RootComponents.Add<App>("#app");
  12. builder.RootComponents.Add<HeadOutlet>("head::after");
  13. builder.Services.AddBlazoredLocalStorage(config => config.JsonSerializerOptions.WriteIndented = true);
  14. builder.Services.AddScoped<ISwalUtils, SwalUtils>();
  15. builder.Services.AddSweetAlert2();
  16. builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
  17. builder.Services.AddBlazorBootstrap();
  18. builder.Services.AddScoped<ILoadingSpinner, LoadingSpinner>();
  19. builder.Services.AddScoped<IHttpClientWithLoginToken, HttpClientWithLoginToken>();
  20. builder.Services.AddScoped<IBrowserTools, BrowserTools>();
  21. builder.Services.AddScoped<IUserUtils, UserUtils>();
  22. #region Api
  23. builder.Services.AddScoped<IPlantsUtils, PlantsUtils>();
  24. #endregion
  25. await builder.Build().RunAsync();