Skip to content

Commit

Permalink
static constructor is off
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilLord666 committed Mar 5, 2024
1 parent 5264445 commit 8bba885
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/Wissance.Zerial/Wissance.Zerial.Desktop/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ namespace Wissance.Zerial.Desktop
{
public class App : Application
{
static App()
/*static App()
{
// appsettings is optional due to we don't actually know install dir i.e. in Snap, but we could execute from any working dir
IConfigurationBuilder builder = new ConfigurationBuilder();
/*try
try
{
builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
Expand All @@ -24,15 +24,15 @@ static App()
catch (Exception e)
{
builder = new ConfigurationBuilder();
}*/
}
Configuration = builder.Build();
ServiceCollection services = new ServiceCollection();
// services.AddLogging();
ServiceProvider = services.BuildServiceProvider();
}
}*/

public override void Initialize()
{
Expand All @@ -49,9 +49,9 @@ public override void OnFrameworkInitializationCompleted()
base.OnFrameworkInitializationCompleted();
}

public static IServiceProvider ServiceProvider { get; private set; }
public static IConfiguration Configuration { get; private set; }
//public static IServiceProvider ServiceProvider { get; private set; }
//public static IConfiguration Configuration { get; private set; }

private const string AppSettingsFile = "appsettings.json";
//private const string AppSettingsFile = "appsettings.json";
}
}

0 comments on commit 8bba885

Please sign in to comment.