using Avalonia; using Microsoft.Extensions.DependencyInjection; using OF_DL.Services; using Serilog; namespace OF_DL.Gui; public static class Program { public static bool HidePrivateInfo { get; private set; } public static void Main(string[] args) { // Parse command line arguments HidePrivateInfo = args.Contains("--hide-private-info", StringComparer.OrdinalIgnoreCase); ServiceCollection services = new(); services.AddSingleton(); ServiceProvider tempProvider = services.BuildServiceProvider(); ILoggingService loggingService = tempProvider.GetRequiredService(); Log.Information("Starting OF DL GUI"); BuildAvaloniaApp() .StartWithClassicDesktopLifetime(args); } private static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure() .UsePlatformDetect() .LogToTrace(); }