-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMauiProgram.cs
More file actions
40 lines (33 loc) · 1019 Bytes
/
Copy pathMauiProgram.cs
File metadata and controls
40 lines (33 loc) · 1019 Bytes
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
using Microsoft.Extensions.Logging;
using Wikkit.Data;
using Wikkit.Services;
using BlazorBootstrap;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.JSInterop;
namespace Wikkit;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("Roboto-Regular.ttf", "RobotoRegular");
});
builder.Services.AddMauiBlazorWebView();
builder.Services.AddBlazorBootstrap();
#if DEBUG
builder.Services.AddBlazorWebViewDeveloperTools();
#endif
builder.Logging.AddDebug();
builder.Services.AddScoped<Logger<WikipediaDataService>>();
builder.Services.AddScoped<HttpClient>();
builder.Services.AddSingleton<WikipediaDataService>();
builder.Services.AddScoped<SettingsService>();
builder.Services.AddScoped<ArticleHistoryService>();
builder.Services.AddScoped<BookmarkService>();
return builder.Build();
}
}