Permalink
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?
6002CEM_ObadaNasr/MauiProgram.cs
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfixes and comments
49 lines (36 sloc)
1.33 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global using Microsoft.Extensions.Logging; | |
global using System; | |
global using TinyMvvm; | |
global using app.ViewModels; | |
global using app.Views; | |
global using app.Models; | |
global using CommunityToolkit.Mvvm.Input; | |
global using CommunityToolkit.Mvvm.ComponentModel; | |
global using Microsoft.Maui.Controls; | |
global using app.Services; | |
global using CommunityToolkit.Maui; | |
global using System.Text.Json.Serialization; | |
namespace app; | |
public static class MauiProgram { | |
public static MauiApp CreateMauiApp() { | |
var builder = MauiApp.CreateBuilder(); | |
builder | |
.UseMauiApp<App>() | |
.UseTinyMvvm() | |
.UseMauiCommunityToolkit() | |
.ConfigureFonts(fonts => { | |
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); | |
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); | |
}); | |
#if DEBUG | |
builder.Logging.AddDebug(); | |
#endif | |
builder.Services.AddTransient<LoginView>(); | |
builder.Services.AddTransient<HomeView>(); | |
builder.Services.AddTransient<LoginViewModel>(); | |
builder.Services.AddTransient<HomeViewModel>(); | |
builder.Services.AddSingleton<SpotifyServiceInterface, SpotifyService>(); | |
builder.Services.AddSingleton<SecureStorageServiceInterface, SecureStorageService>(); | |
return builder.Build(); | |
} | |
} | |