public App() { Log.Logger = new LoggerConfiguration() .WriteTo.Console() .WriteTo.File("log-.txt", rollingInterval: RollingInterval.Day) .CreateLogger(); Log.Information("Logger Loaded"); if (!Directory.Exists(SettingsFileRootDir + SettingsFileAppDir)) { try { Directory.CreateDirectory(SettingsFileRootDir + SettingsFileAppDir); } catch (Exception) { } } try { Settings = ApplicationSettings_Serializer.Load(SettingsFilePath); } catch (Exception) { Settings = new ApplicationSettings_Serializer.ApplicationSettings(); } }
public App() { if (!Directory.Exists(SettingsFileRootDir + SettingsFileAppDir)) { try { Directory.CreateDirectory(SettingsFileRootDir + SettingsFileAppDir); } catch (Exception) { } } try { Settings = ApplicationSettings_Serializer.Load(SettingsFilePath); } catch (Exception) { Settings = new ApplicationSettings_Serializer.ApplicationSettings(); } }