-
Notifications
You must be signed in to change notification settings - Fork 0
/
MauiProgram.cs
35 lines (29 loc) · 949 Bytes
/
MauiProgram.cs
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
using Microsoft.Extensions.Logging;
using DevExpress.Maui;
using Microsoft.Extensions.Configuration;
using HaircutReservation.Services;
using Main.Pages;
namespace Main
{
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
builder.Configuration.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
var cosmosConnectionString = builder.Configuration["CosmosDb:ConnectionString"];
builder.Services.AddSingleton(s => new CosmosDataService(cosmosConnectionString));
builder.Services.AddTransient<ReservationPage>();
builder.Services.AddTransient<ReservationPageAPI>();
builder.UseDevExpress();
return builder.Build();
}
}
}