private Settings() { RememberCredentials = true; EnableInjection = true; UpdateAssembliesOnStart = true; SelectedLanguage = Language.Default; Configuration = new SettingsConfiguration(); Directories = new SettingsDirectories(); Ui = new SettingsUI(); InstalledAddons = new InstalledAddonList(); UserCredentials = new Credentials(); Directories.Verify(); }
internal void Verify() { var newInstance = new SettingsDirectories(); foreach (var property in GetType().GetProperties()) { var propertyValue = property.GetValue(this); if (propertyValue == null && property.GetSetMethod() != null) { property.SetValue(this, property.GetValue(newInstance)); } } CreateDirectories(); }