public ModuniSettings() { this.developerSettings = new DeveloperSettings(); Configuration gitConfiguration = LibGit2Sharp.Configuration.BuildFrom(null); if (gitConfiguration.HasConfig(ConfigurationLevel.Global) || gitConfiguration.HasConfig(ConfigurationLevel.System)) { this.developerSettings.fullName = gitConfiguration.Get <string>("user.name").Value; this.developerSettings.emailAddress = gitConfiguration.Get <string>("user.email").Value; } this.repositoryManagerSettings = new List <ARepositoryManagerSettings>(); }
public void UpdateSettings(DeveloperSettings developerSettings, IEnumerable <ARepositoryManagerSettings> repositoriesManagersSettings, bool isProjectOnlySettings) { this.settingsManager.ModuniSettings.DeveloperSettings = developerSettings; this.settingsManager.ModuniSettings.RepositoryManagerSettings = new List <ARepositoryManagerSettings>(repositoriesManagersSettings); if (isProjectOnlySettings) { this.settingsManager.SaveForProject(); } else { this.settingsManager.SaveForProjectAndEditor(); } if (OnRepositoriesManagersSettingsUpdated != null) { OnRepositoriesManagersSettingsUpdated(this.settingsManager.ModuniSettings.RepositoryManagerSettings); } this.CreateRepositoriesManagers(); }