public static ProjectConnectionSettings FromKey( string ProjectId, RegistryKey registryKey) { var settings = new ProjectConnectionSettings(ProjectId); settings.InitializeFromKey(registryKey); return(settings); }
public void SetProjectSettings(ProjectConnectionSettings settings) { using (var key = this.projectRepository.OpenRegistryKey(settings.ProjectId)) { if (key == null) { throw new KeyNotFoundException(settings.ProjectId); } settings.Save(key); } }
//--------------------------------------------------------------------- // Projects. //--------------------------------------------------------------------- public ProjectConnectionSettings GetProjectSettings(string projectId) { using (var key = this.projectRepository.OpenRegistryKey(projectId)) { if (key == null) { throw new KeyNotFoundException(projectId); } return(ProjectConnectionSettings.FromKey(projectId, key)); } }