Пример #1
0
        public static ProjectConnectionSettings FromKey(
            string ProjectId,
            RegistryKey registryKey)
        {
            var settings = new ProjectConnectionSettings(ProjectId);

            settings.InitializeFromKey(registryKey);
            return(settings);
        }
Пример #2
0
        public void SetProjectSettings(ProjectConnectionSettings settings)
        {
            using (var key = this.projectRepository.OpenRegistryKey(settings.ProjectId))
            {
                if (key == null)
                {
                    throw new KeyNotFoundException(settings.ProjectId);
                }

                settings.Save(key);
            }
        }
Пример #3
0
        //---------------------------------------------------------------------
        // 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));
            }
        }