diff --git a/Sources/HeartTrack/Program.cs b/Sources/HeartTrack/Program.cs index 5d6d55a..9ec56ff 100644 --- a/Sources/HeartTrack/Program.cs +++ b/Sources/HeartTrack/Program.cs @@ -10,17 +10,11 @@ using HeartTrack.Services.ActivityDataService; using HeartTrack.Services.ReportDataService; using HeartTrack.Services.UserDataService; using HeartTrack.Services.TicketDataService; -using Blazorise; -using Blazorise.Bootstrap; -using Blazorise.Icons.FontAwesome; -using Microsoft.AspNetCore.Localization; -using System.Globalization; -using Microsoft.Extensions.Options; -using Blazored.LocalStorage; -using HeartTrack.Services; -using Microsoft.AspNetCore.Components.Authorization; using MudBlazor.Services; +using HeartTrack.Services.ActivityDataServiceFactice; +using HeartTrack.Services.ReportDataServiceFactice; using HeartTrack.Services.TicketDataServiceFactice; +using HeartTrack.Services.UserDataServiceFactice; var builder = WebApplication.CreateBuilder(args); @@ -34,10 +28,10 @@ builder.Services.AddHttpClient(); // Add Services builder.Services.AddScoped(); -builder.Services.AddScoped(); -builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); builder.Services.AddScoped(); -builder.Services.AddScoped(); +builder.Services.AddScoped(); builder.Services.AddBlazorise() @@ -50,34 +44,7 @@ builder.Services.AddControllers(); // Add the localization to the app and specify the resources path builder.Services.AddLocalization(opts => { opts.ResourcesPath = "Resources"; }); -// Configure the localtization -builder.Services.Configure(options => -{ - // Set the default culture of the web site - options.DefaultRequestCulture = new RequestCulture(new CultureInfo("en-US")); - - // Declare the supported culture - options.SupportedCultures = new List { new CultureInfo("en-US"), new CultureInfo("fr-FR") }; - options.SupportedUICultures = new List { new CultureInfo("en-US"), new CultureInfo("fr-FR") }; -}); - -builder.Services.AddBlazoredLocalStorage(); - -builder.Services.AddHttpClient(); - -builder.Services.AddScoped(); - -builder.Services.AddBlazorise() - .AddBootstrapProviders() - .AddFontAwesomeIcons(); - -// Add the controller of the app -builder.Services.AddControllers(); - -// Add the localization to the app and specify the resources path -builder.Services.AddLocalization(opts => { opts.ResourcesPath = "Resources"; }); - -// Configure the localtization +// Configure the localization builder.Services.Configure(options => { // Set the default culture of the web site @@ -124,5 +91,4 @@ app.UseEndpoints(endpoints => app.MapBlazorHub(); app.MapFallbackToPage("/_Host"); -app.Run(); - +app.Run(); \ No newline at end of file