internal void SetUseprocedurebodies(MySqlConnectionStringBuilder msb, MySqlConnectionStringOption sender, object value)
 {
     sender.ValidateValue(ref value);
     MySqlTrace.LogWarning(-1, "Use Procedure Bodies is now obsolete.  Use Check Parameters instead");
     msb.SetValue("checkparameters", value);
     msb.SetValue("useprocedurebodies", value);
 }
Esempio n. 2
0
        internal void SetValue(string keyword, object value)
        {
            MySqlConnectionStringOption option = this.GetOption(keyword);

            option.ValidateValue(ref value);
            option.Clean(this);
            if (value != null)
            {
                lock (this)
                {
                    this.values[option.Keyword] = value;
                    base[keyword] = value;
                }
            }
        }
        internal void SetInternalValue(string keyword, object value)
        {
            MySqlConnectionStringOption option = GetOption(keyword);

            option.ValidateValue(ref value);

            // remove all related keywords
            option.Clean(this);

            if (value != null)
            {
                lock (this)
                {
                    // set value for the given keyword
                    values[option.Keyword] = value;
                    base[keyword]          = value;
                }
            }
        }
        internal void SetValue(string keyword, object value)
        {
            MySqlConnectionStringOption option = this.GetOption(keyword);

            option.ValidateValue(ref value);
            option.Clean(this);
            if (value != null)
            {
                bool flag = false;
                try
                {
                    Monitor.Enter(this, ref flag);
                    this.values[option.Keyword] = value;
                    base[keyword] = value;
                }
                finally
                {
                    if (flag)
                    {
                        Monitor.Exit(this);
                    }
                }
            }
        }
 internal void SetValue(MySqlConnectionStringBuilder msb, MySqlConnectionStringOption sender, object value)
 {
     sender.ValidateValue(ref value);
     msb.SetValue(sender.Keyword, Convert.ChangeType(value, sender.BaseType));
 }
 internal void SetSslMode(MySqlConnectionStringBuilder msb, MySqlConnectionStringOption sender, object value)
 {
     sender.ValidateValue(ref value);
     MySqlTrace.LogWarning(-1, "Encrypt is now obsolete. Use Ssl Mode instead");
     msb.SetValue("Ssl Mode", ((bool)value) ? MySqlSslMode.Preferred : MySqlSslMode.None);
 }