-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
89 lines (75 loc) · 4.11 KB
/
Program.cs
File metadata and controls
89 lines (75 loc) · 4.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
using BlazorDownloadFile;
using Blazored.LocalStorage;
using FakeDataMaker;
using FakeDataMaker.Services.Implementations;
using FakeDataMaker.Services.Interfaces;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using MudBlazor;
using MudBlazor.Services;
#region Initialization
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://andredobbss.github.io/FakeDataMaker/") });
#endregion
#region Congiguration MudBlazor
builder.Services.AddMudServices(config =>
{
config.SnackbarConfiguration.PositionClass = Defaults.Classes.Position.BottomRight;
config.SnackbarConfiguration.PreventDuplicates = false;
config.SnackbarConfiguration.NewestOnTop = false;
config.SnackbarConfiguration.ShowCloseIcon = true;
config.SnackbarConfiguration.VisibleStateDuration = 2000;
config.SnackbarConfiguration.HideTransitionDuration = 500;
config.SnackbarConfiguration.ShowTransitionDuration = 500;
config.SnackbarConfiguration.SnackbarVariant = Variant.Filled;
config.SnackbarConfiguration.SuccessIcon = Icons.Material.Filled.CheckCircleOutline;
config.SnackbarConfiguration.ErrorIcon = Icons.Material.Filled.ErrorOutline;
});
builder.Services.AddBlazoredLocalStorage();
builder.Services.AddBlazorDownloadFile();
#endregion
#region Configuration Services
builder.Services.AddScoped<IAccountingFaker, AccountingFaker>();
builder.Services.AddScoped<IAerospaceFaker, AerospaceFaker>();
builder.Services.AddScoped<IAgricultureFaker, AgricultureFaker>();
builder.Services.AddScoped<IAutomotiveFaker, AutomotiveFaker>();
builder.Services.AddScoped<IBiotechnologyFaker, BiotechnologyFaker>();
builder.Services.AddScoped<ICivilConstructionFaker, CivilConstructionFaker>();
builder.Services.AddScoped<IConsumerGoodsFaker, ConsumerGoodsFaker>();
builder.Services.AddScoped<IContabilityFaker, ContabilityFaker> ();
builder.Services.AddScoped<ICybersecurityFaker, CybersecurityFaker>();
builder.Services.AddScoped<IEcommerceFaker, EcommerceFaker>();
builder.Services.AddScoped<IEconomyFaker, EconomyFaker>();
builder.Services.AddScoped<IEducationFaker, EducationFaker>();
builder.Services.AddScoped<IEnergyFaker, EnergyFaker>();
builder.Services.AddScoped<IEntertainmentFaker, EntertainmentFaker>();
builder.Services.AddScoped<IEnvironmentalServiceFaker, EnvironmentalServiceFaker>();
builder.Services.AddScoped<IFinanceFaker, FinanceFaker>();
builder.Services.AddScoped<IFoodFaker, FoodFaker>();
builder.Services.AddScoped<IGovernmentPublicSectorFaker, GovernmentPublicSectorFaker>();
builder.Services.AddScoped<IHealthcareFaker, HealthcareFaker>();
builder.Services.AddScoped<IHospitalityFaker, HospitalityFaker>();
builder.Services.AddScoped<IInformationTechnologyFaker, InformationTechnologyFaker>();
builder.Services.AddScoped<IInsuranceFaker, InsuranceFaker>();
builder.Services.AddScoped<ILegalServicesFaker, LegalServicesFaker>();
builder.Services.AddScoped<ILogisticsFaker, LogisticsFaker>();
builder.Services.AddScoped<IManufacturingFaker, ManufacturingFaker>();
builder.Services.AddScoped<IMarketingFaker, MarketingFaker>();
builder.Services.AddScoped<IMediaPublishingFaker, MediaPublishingFaker>();
builder.Services.AddScoped<IMiningFaker, MiningFaker>();
builder.Services.AddScoped<INonprofitFaker, NonprofitFaker>();
builder.Services.AddScoped<IRealEstateFaker, RealEstateFaker>();
builder.Services.AddScoped<IRetailFaker, RetailFaker>();
builder.Services.AddScoped<ISportsRecreationFaker, SportsRecreationFaker>();
builder.Services.AddScoped<ITelecommunicationsFaker, TelecommunicationsFaker>();
builder.Services.AddScoped<ITransportationFaker, TransportationFaker>();
builder.Services.AddScoped<IFileExporterService, FileExporterService>();
builder.Services.AddScoped<ILanguages, Languages>();
builder.Services.AddScoped<ISectors, Sectors>();
#endregion
#region Run Application
await builder.Build().RunAsync();
#endregion