コード例 #1
0
        protected InstanceConnectionSettings ApplyDefaults(ZoneConnectionSettings zoneSettings)
        {
            var prototype = new InstanceConnectionSettings(this.ProjectId, this.InstanceName);

            ApplyOverlay(prototype, zoneSettings, this);
            return(prototype);
        }
コード例 #2
0
        public ZoneConnectionSettings OverlayBy(ZoneConnectionSettings zoneSettings)
        {
            var result = ZoneConnectionSettings.CreateNew(
                zoneSettings.ProjectId,
                zoneSettings.ZoneId);

            ApplyOverlay(result, this, zoneSettings);
            return(result);
        }
コード例 #3
0
        public static ZoneConnectionSettings FromKey(
            string projectId,
            string zoneId,
            RegistryKey registryKey)
        {
            var settings = new ZoneConnectionSettings(projectId, zoneId);

            settings.InitializeFromKey(registryKey);
            return(settings);
        }
コード例 #4
0
 public void SetZoneSettings(ZoneConnectionSettings settings)
 {
     using (var key = this.projectRepository.OpenRegistryKey(
                settings.ProjectId,
                ZonePrefix + settings.ZoneId,
                true))
     {
         settings.Save(key);
     }
 }
コード例 #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));
            }
        }