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);
        }
Esempio n. 4
0
 public void SetZoneSettings(ZoneConnectionSettings settings)
 {
     using (var key = this.projectRepository.OpenRegistryKey(
                settings.ProjectId,
                ZonePrefix + settings.ZoneId,
                true))
     {
         settings.Save(key);
     }
 }
Esempio n. 5
0
        //---------------------------------------------------------------------
        // Zones.
        //---------------------------------------------------------------------

        public ZoneConnectionSettings GetZoneSettings(string projectId, string zoneId)
        {
            using (var key = this.projectRepository.OpenRegistryKey(
                       projectId,
                       ZonePrefix + zoneId,
                       true))
            {
                return(ZoneConnectionSettings.FromKey(
                           projectId,
                           zoneId,
                           key));
            }
        }