protected InstanceConnectionSettings ApplyDefaults(ZoneConnectionSettings zoneSettings) { var prototype = new InstanceConnectionSettings(this.ProjectId, this.InstanceName); ApplyOverlay(prototype, zoneSettings, this); return(prototype); }
public ZoneConnectionSettings OverlayBy(ZoneConnectionSettings zoneSettings) { var result = ZoneConnectionSettings.CreateNew( zoneSettings.ProjectId, zoneSettings.ZoneId); ApplyOverlay(result, this, zoneSettings); return(result); }
public static ZoneConnectionSettings FromKey( string projectId, string zoneId, RegistryKey registryKey) { var settings = new ZoneConnectionSettings(projectId, zoneId); settings.InitializeFromKey(registryKey); return(settings); }
public void SetZoneSettings(ZoneConnectionSettings settings) { using (var key = this.projectRepository.OpenRegistryKey( settings.ProjectId, ZonePrefix + settings.ZoneId, true)) { settings.Save(key); } }
//--------------------------------------------------------------------- // Zones. //--------------------------------------------------------------------- public ZoneConnectionSettings GetZoneSettings(string projectId, string zoneId) { using (var key = this.projectRepository.OpenRegistryKey( projectId, ZonePrefix + zoneId, true)) { return(ZoneConnectionSettings.FromKey( projectId, zoneId, key)); } }