Skip to content
Permalink
8aa6fc5d3a
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
28 lines (24 sloc) 801 Bytes
using Microsoft.Extensions.Logging;
namespace WebAppCW
{
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");
});
string dbPath = FileAccessHelper.GetLocalFilePath("User.db3");
builder.Services.AddSingleton<UserDB>(s => ActivatorUtilities.CreateInstance<UserDB>(s, dbPath));
#if DEBUG
builder.Logging.AddDebug();
#endif
return builder.Build();
}
}
}