Files
LMEMappeCatastaliProApp/MauiProgram.cs
T

48 lines
1.8 KiB
C#

using LMEMappeCatastaliApp.Services;
using Microsoft.Extensions.Logging;
namespace LMEMappeCatastaliApp;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
});
builder.Services.AddMauiBlazorWebView();
builder.Services.AddSingleton<PreciseLocationService>();
builder.Services.AddSingleton<CadastralCatalogService>();
builder.Services.AddSingleton<OfficialCadastreService>();
builder.Services.AddSingleton<LocationSearchService>();
builder.Services.AddSingleton<NetworkLocationService>();
builder.Services.AddSingleton<AzureMapsService>();
builder.Services.AddSingleton<ProjectStorageService>();
builder.Services.AddSingleton<MapExportService>();
builder.Services.AddSingleton<CloudSyncService>();
builder.Services.AddSingleton<AppUpdateService>();
builder.Services.AddSingleton(IncomingFileService.Shared);
builder.Services.AddSingleton<AppLocalizationService>();
builder.Services.AddSingleton<ManualLicenseService>();
builder.Services.AddSingleton<PlayPurchaseVerificationService>();
#if ANDROID
builder.Services.AddSingleton<IPlayBillingService, Platforms.Android.AndroidPlayBillingService>();
#else
builder.Services.AddSingleton<IPlayBillingService, UnavailablePlayBillingService>();
#endif
builder.Services.AddSingleton<EntitlementService>();
#if DEBUG
builder.Services.AddBlazorWebViewDeveloperTools();
builder.Logging.AddDebug();
#endif
return builder.Build();
}
}