-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMauiProgram.cs
More file actions
45 lines (37 loc) · 1.38 KB
/
MauiProgram.cs
File metadata and controls
45 lines (37 loc) · 1.38 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
using Microsoft.Extensions.Logging;
using UserManagementApp.Services;
using UserManagementApp.Views;
namespace UserManagementApp
{
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");
});
#if DEBUG
builder.Logging.AddDebug();
#endif
// Register HttpClient with base address
builder.Services.AddSingleton(new HttpClient
{
BaseAddress = new Uri("http://10.0.2.2:5009")
});
builder.Services.AddSingleton<IAuthService,AuthService>();
builder.Services.AddSingleton<IAlertService, AlertService>();
builder.Services.AddSingleton<IUserProfileService, UserProfileService>();
builder.Services.AddSingleton<LoginPage>();
builder.Services.AddSingleton<HomePage>();
builder.Services.AddSingleton<RegisterPage>();
builder.Services.AddSingleton<UserprofilePage>();
builder.Services.AddSingleton<ProfilePage>();
return builder.Build();
}
}
}