-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMauiProgram.cs
More file actions
27 lines (25 loc) · 804 Bytes
/
MauiProgram.cs
File metadata and controls
27 lines (25 loc) · 804 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
using Microsoft.Extensions.Logging;
using MathGame.Maui.Data;
namespace Maui.MathGame
{
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("BitcountGridDoubleInk-VariableFont.ttf", "BitcountGridDoubleInkVariableFont");
});
string dbPath = Path.Combine(FileSystem.AppDataDirectory, "game.db");
builder.Services.AddSingleton(s =>
ActivatorUtilities.CreateInstance<GameRepo>(s, dbPath));
#if DEBUG
builder.Logging.AddDebug();
#endif
return builder.Build();
}
}
}