Exemplo n.º 1
0
        protected override void SaveTo(IObjectData data, bool omitDefault)
        {
            // argument checks
            Debug.Assert(data != null);

            // save settings
            data.SetStringValue(SettingNames.EndPoint, this.EndPoint, omitDefault, Defaults.IsDefaultEndPoint(this.EndPoint));
            data.SetStringValue(SettingNames.UserName, this.UserName, omitDefault, Defaults.IsDefaultUserName(this.UserName));
            data.SetValue(SettingNames.ProtectedPassword, this.Password, CreatePasswordValue, omitDefault, Defaults.IsDefaultPassword(this.Password));
            data.SetEnumValue(SettingNames.Persistence, this.Persistence, omitDefault, this.Persistence == Defaults.Persistence);
            data.SetBooleanValue(SettingNames.EnableAssumptionMode, this.EnableAssumptionMode, omitDefault, this.EnableAssumptionMode == Defaults.EnableAssumptionMode);

            return;
        }
Exemplo n.º 2
0
        protected override void SaveTo(IObjectData data, bool omitDefault)
        {
            // argument checks
            Debug.Assert(data != null);

            // save settings
            data.SetStringValue(SettingNames.AutoConfigURL, this.AutoConfigURL);
            data.SetValue(SettingNames.ProxyEnable, this.ProxyEnable, ObjectDataExtension.CreateInt32Value);
            data.SetStringValue(SettingNames.ProxyServer, this.ProxyServer);
            data.SetStringValue(SettingNames.ProxyOverride, this.ProxyOverride);
            data.SetBooleanValue(SettingNames.AutoDetect, this.AutoDetect);
            data.SetStringValue(SettingNames.HttpProxyEnvironmentVariable, this.HttpProxyEnvironmentVariable);
            data.SetStringValue(SettingNames.HttpsProxyEnvironmentVariable, this.HttpsProxyEnvironmentVariable);

            return;
        }
Exemplo n.º 3
0
        protected override void SaveTo(IObjectData data, bool omitDefault)
        {
            // argument checks
            Debug.Assert(data != null);

            // state checks
            EnsureIsValid();
            Debug.Assert(string.IsNullOrEmpty(this.Host) == false || string.IsNullOrEmpty(this.ConfigurationScript) == false);
            Debug.Assert(IPEndPoint.MinPort <= this.Port && this.Port <= IPEndPoint.MaxPort);

            // save settings (these settings are not omittable)
            string host      = this.Host;
            bool   isDefault = (host == null || AreSameHostName(host, Defaults.Host));

            data.SetStringValue(SettingNames.Host, this.Host, omitDefault, isDefault);
            data.SetInt32Value(SettingNames.Port, this.Port, omitDefault, this.Port == Defaults.Port);
            data.SetStringValue(SettingNames.ConfigurationScript, this.ConfigurationScript, omitDefault, this.ConfigurationScript == Defaults.ConfigurationScript);

            return;
        }
Exemplo n.º 4
0
        protected override void SaveTo(IObjectData data, bool omitDefault)
        {
            // argument checks
            Debug.Assert(data != null);

            // save the base class level settings
            base.SaveTo(data, omitDefault);

            // save this class level settings
            data.SetStringValue(SettingNames.ProxyOverride, this.ProxyOverride, omitDefault, this.ProxyOverride == Defaults.ProxyOverride);

            return;
        }