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);
 }
 private static void AddOption(MySqlConnectionStringOption option)
 {
     foreach (string key in option.m_keys)
     {
         s_options.Add(key, option);
     }
 }
 public override object this[string keyword]
 {
     get
     {
         MySqlConnectionStringOption opt = GetOption(keyword);
         if (opt.BaseGetter != null)
         {
             return(opt.BaseGetter(this, opt));
         }
         else if (opt.Getter != null)
         {
             return(opt.Getter(this, opt));
         }
         else
         {
             throw new ArgumentException(Resources.KeywordNotSupported, keyword);
         }
     }
     set
     {
         MySqlConnectionStringOption opt = GetOption(keyword);
         if (opt.BaseSetter != null)
         {
             opt.BaseSetter(this, opt, value);
         }
         else if (opt.Setter != null)
         {
             opt.Setter(this, opt, value);
         }
         else
         {
             throw new ArgumentException(Resources.KeywordNotSupported, keyword);
         }
     }
 }
 internal void SetIntegratedSecurity(MySqlConnectionStringBuilder msb, MySqlConnectionStringOption sender, object value)
 {
     if (!Platform.IsWindows())
     {
         throw new MySqlException("IntegratedSecurity is supported on Windows only");
     }
     msb.SetValue("Integrated Security", value);
 }
Esempio n. 5
0
        private MySqlConnectionStringOption GetOption(string key)
        {
            MySqlConnectionStringOption mySqlConnectionStringOption = MySqlConnectionStringBuilder.options.Get(key);

            if (mySqlConnectionStringOption == null)
            {
                throw new ArgumentException(Resources.KeywordNotSupported, key);
            }
            return(mySqlConnectionStringOption);
        }
        internal MySqlConnectionStringOption GetOption(string key)
        {
            MySqlConnectionStringOption option = Options.Get(key);

            if (option == null)
            {
                throw new ArgumentException(Resources.KeywordNotSupported, key);
            }
            else
            {
                return(option);
            }
        }
Esempio n. 7
0
 public override object this[string keyword]
 {
     get
     {
         MySqlConnectionStringOption option = this.GetOption(keyword);
         return(option.Getter(this, option));
     }
     set
     {
         MySqlConnectionStringOption option = this.GetOption(keyword);
         option.Setter(this, option, value);
     }
 }
        internal void SetValue(string keyword, object value, [CallerMemberName] string callerName = "")
        {
            MySqlConnectionStringOption option = GetOption(keyword);

            if (callerName != ".cctor" && option.IsCustomized)
            {
                this[keyword] = value;
            }
            else
            {
                SetInternalValue(keyword, value);
            }
        }
Esempio n. 9
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;
                }
            }
        }
        public override bool Remove(string keyword)
        {
            bool removed = false;

            lock (this) { removed = base.Remove(keyword); }
            if (!removed)
            {
                return(false);
            }
            MySqlConnectionStringOption option = GetOption(keyword);

            lock (this)
            {
                values[option.Keyword] = option.DefaultValue;
            }
            return(true);
        }
            internal void SetConnectionTimeOut(MySqlConnectionStringBuilder msb, MySqlConnectionStringOption sender, object Value)
            {
                uint num  = (uint)Convert.ChangeType(Value, sender.BaseType);
                uint num2 = Math.Min(num, 2147483u);

                if (num2 != num)
                {
                    MySqlTrace.LogWarning(-1, string.Concat(new object[]
                    {
                        "Connection timeout value too large (",
                        num,
                        " seconds). Changed to max. possible value",
                        num2,
                        " seconds)"
                    }));
                }
                msb.SetValue("connectiontimeout", num2);
            }
        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;
                }
            }
        }
        public override bool Remove(string keyword)
        {
            bool flag = false;
            MySqlConnectionStringBuilder obj = this;

            lock (obj)
            {
                flag = base.Remove(keyword);
            }
            if (!flag)
            {
                return(false);
            }
            MySqlConnectionStringOption option = this.GetOption(keyword);

            obj = this;
            lock (obj)
            {
                this.values[option.Keyword] = option.DefaultValue;
            }
            return(true);
        }
        public override bool Remove(string keyword)
        {
            bool flag  = false;
            bool flag2 = false;

            try
            {
                Monitor.Enter(this, ref flag2);
                flag = base.Remove(keyword);
            }
            finally
            {
                if (flag2)
                {
                    Monitor.Exit(this);
                }
            }
            if (!flag)
            {
                return(false);
            }
            MySqlConnectionStringOption option = this.GetOption(keyword);
            bool flag3 = false;

            try
            {
                Monitor.Enter(this, ref flag3);
                this.values[option.Keyword] = option.DefaultValue;
            }
            finally
            {
                if (flag3)
                {
                    Monitor.Exit(this);
                }
            }
            return(true);
        }
        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 object GetSslMode(MySqlConnectionStringBuilder msb, MySqlConnectionStringOption sender)
 {
     return(msb.SslMode > MySqlSslMode.None);
 }
        static MySqlConnectionStringOption()
        {
            s_options = new Dictionary <string, MySqlConnectionStringOption>(StringComparer.OrdinalIgnoreCase);

            // Base Options
            AddOption(Server = new MySqlConnectionStringOption <string>(
                          keys: new[] { "Server", "Host", "Data Source", "DataSource", "Address", "Addr", "Network Address" },
                          defaultValue: ""));

            AddOption(Port = new MySqlConnectionStringOption <uint>(
                          keys: new[] { "Port" },
                          defaultValue: 3306u));

            AddOption(UserID = new MySqlConnectionStringOption <string>(
                          keys: new[] { "User Id", "UserID", "Username", "Uid", "User name", "User" },
                          defaultValue: ""));

            AddOption(Password = new MySqlConnectionStringOption <string>(
                          keys: new[] { "Password", "pwd" },
                          defaultValue: ""));

            AddOption(Database = new MySqlConnectionStringOption <string>(
                          keys: new[] { "Database", "Initial Catalog" },
                          defaultValue: ""));

            // SSL/TLS Options
            AddOption(SslMode = new MySqlConnectionStringOption <MySqlSslMode>(
                          keys: new[] { "SSL Mode", "SslMode" },
                          defaultValue: MySqlSslMode.None));

            AddOption(CertificateFile = new MySqlConnectionStringOption <string>(
                          keys: new[] { "CertificateFile", "Certificate File" },
                          defaultValue: null));

            AddOption(CertificatePassword = new MySqlConnectionStringOption <string>(
                          keys: new[] { "CertificatePassword", "Certificate Password" },
                          defaultValue: null));

            // Connection Pooling Options
            AddOption(Pooling = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "Pooling" },
                          defaultValue: true));

            AddOption(ConnectionReset = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "Connection Reset", "ConnectionReset" },
                          defaultValue: true));

            AddOption(MinimumPoolSize = new MySqlConnectionStringOption <uint>(
                          keys: new[] { "Minimum Pool Size", "Min Pool Size", "MinimumPoolSize", "minpoolsize" },
                          defaultValue: 0));

            AddOption(MaximumPoolSize = new MySqlConnectionStringOption <uint>(
                          keys: new[] { "Maximum Pool Size", "Max Pool Size", "MaximumPoolSize", "maxpoolsize" },
                          defaultValue: 100));

            // Other Options
            AddOption(AllowUserVariables = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "AllowUserVariables", "Allow User Variables" },
                          defaultValue: false));

            AddOption(CharacterSet = new MySqlConnectionStringOption <string>(
                          keys: new[] { "CharSet", "Character Set", "CharacterSet" },
                          defaultValue: ""));

            AddOption(ConnectionTimeout = new MySqlConnectionStringOption <uint>(
                          keys: new[] { "Connection Timeout", "ConnectionTimeout", "Connect Timeout" },
                          defaultValue: 15u));

            AddOption(ConvertZeroDateTime = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "Convert Zero Datetime", "ConvertZeroDateTime" },
                          defaultValue: false));

            AddOption(ForceSynchronous = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "ForceSynchronous" },
                          defaultValue: false));

            AddOption(OldGuids = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "Old Guids", "OldGuids" },
                          defaultValue: false));

            AddOption(PersistSecurityInfo = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "Persist Security Info", "PersistSecurityInfo" },
                          defaultValue: false));

            AddOption(UseAffectedRows = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "Use Affected Rows", "UseAffectedRows" },
                          defaultValue: true));

            AddOption(UseCompression = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "Compress", "Use Compression", "UseCompression" },
                          defaultValue: false));
        }
 internal object GetIntegratedSecurity(MySqlConnectionStringBuilder msb, MySqlConnectionStringOption sender)
 {
     return((bool)msb.values["Integrated Security"]);
 }
 public override object this[string key]
 {
     get { return(MySqlConnectionStringOption.GetOptionForKey(key).GetObject(this)); }
     set { base[MySqlConnectionStringOption.GetOptionForKey(key).Key] = Convert.ToString(value, CultureInfo.InvariantCulture); }
 }
        public override bool Remove(string key)
        {
            var option = MySqlConnectionStringOption.TryGetOptionForKey(key);

            return(option != null && base.Remove(option.Key));
        }
Esempio n. 21
0
        public override bool ContainsKey(string keyword)
        {
            MySqlConnectionStringOption mySqlConnectionStringOption = MySqlConnectionStringBuilder.options.Get(keyword);

            return(mySqlConnectionStringOption != null);
        }
Esempio n. 22
0
        static MySqlConnectionStringOption()
        {
            s_options = new Dictionary <string, MySqlConnectionStringOption>(StringComparer.OrdinalIgnoreCase);

            AddOption(Server = new MySqlConnectionStringOption <string>(
                          keys: new[] { "Server", "Host", "Data Source", "DataSource", "Address", "Addr", "Network Address" },
                          defaultValue: ""));

            AddOption(UserID = new MySqlConnectionStringOption <string>(
                          keys: new[] { "User Id", "UserID", "Username", "Uid", "User name", "User" },
                          defaultValue: ""));

            AddOption(Password = new MySqlConnectionStringOption <string>(
                          keys: new[] { "Password", "pwd" },
                          defaultValue: ""));

            AddOption(Database = new MySqlConnectionStringOption <string>(
                          keys: new[] { "Database", "Initial Catalog" },
                          defaultValue: ""));

            AddOption(Port = new MySqlConnectionStringOption <uint>(
                          keys: new[] { "Port" },
                          defaultValue: 3306u));

            AddOption(AllowUserVariables = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "AllowUserVariables", "Allow User Variables" },
                          defaultValue: false));

            AddOption(CharacterSet = new MySqlConnectionStringOption <string>(
                          keys: new[] { "CharSet", "Character Set", "CharacterSet" },
                          defaultValue: ""));

            AddOption(ConvertZeroDateTime = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "Convert Zero Datetime", "ConvertZeroDateTime" },
                          defaultValue: false));

            AddOption(OldGuids = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "Old Guids", "OldGuids" },
                          defaultValue: false));

            AddOption(PersistSecurityInfo = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "Persist Security Info", "PersistSecurityInfo" },
                          defaultValue: false));

            AddOption(UseCompression = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "Compress", "Use Compression", "UseCompression" },
                          defaultValue: false));

            AddOption(Pooling = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "Pooling" },
                          defaultValue: true));

            AddOption(ConnectionReset = new MySqlConnectionStringOption <bool>(
                          keys: new[] { "Connection Reset", "ConnectionReset" },
                          defaultValue: true));

            AddOption(MinimumPoolSize = new MySqlConnectionStringOption <uint>(
                          keys: new[] { "Minimum Pool Size", "Min Pool Size", "MinimumPoolSize", "minpoolsize" },
                          defaultValue: 0));

            AddOption(MaximumPoolSize = new MySqlConnectionStringOption <uint>(
                          keys: new[] { "Maximum Pool Size", "Max Pool Size", "MaximumPoolSize", "maxpoolsize" },
                          defaultValue: 100));
        }
        /// <summary>
        /// Analyzes the connection string for potential duplicated or invalid connection options.
        /// </summary>
        /// <param name="connectionString">Connection string.</param>
        /// <param name="isXProtocol">Flag that indicates if the connection is using X Protocol.</param>
        /// <param name="isDefaultPort">Flag that indicates if the default port is used.</param>
        internal void AnalyzeConnectionString(string connectionString, bool isXProtocol, bool isDefaultPort = true)
        {
            string[] queries        = connectionString.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
            var      usedSslOptions = new List <string>();
            bool     sslModeIsNone  = false;
            bool     isDnsSrv       = false;

            if (queries.FirstOrDefault(q => q.ToLowerInvariant().Contains("dns-srv=true")) != null ||
                queries.FirstOrDefault(q => q.ToLowerInvariant().Contains("dnssrv=true")) != null)
            {
                isDnsSrv = true;
            }

            foreach (string query in queries)
            {
                string[] keyValue = query.Split('=');
                if (keyValue.Length % 2 != 0)
                {
                    continue;
                }

                var keyword = keyValue[0].ToLowerInvariant().Trim();
                var value   = query.Contains(",") ? query.Replace(keyword, "") : keyValue[1].ToLowerInvariant();
                MySqlConnectionStringOption option = Options.Options.Where(o => o.Keyword == keyword || (o.Synonyms != null && o.Synonyms.Contains(keyword))).FirstOrDefault();

                // DNS SRV option can't be used if Port, Unix Socket or Multihost are specified
                if (isDnsSrv)
                {
                    if (option.Keyword == "port" && !isDefaultPort)
                    {
                        throw new ArgumentException(Resources.DnsSrvInvalidConnOptionPort);
                    }
                    if (option.Keyword == "server" && ((value.Contains("address") && value.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Length > 2) || value.Contains(",")))
                    {
                        throw new ArgumentException(Resources.DnsSrvInvalidConnOptionMultihost);
                    }
                    if (option.Keyword == "protocol" && (value.ToLowerInvariant().Contains("unix") || value.ToLowerInvariant().Contains("unixsocket")))
                    {
                        throw new ArgumentException(Resources.DnsSrvInvalidConnOptionUnixSocket);
                    }
                }

                if (option == null ||
                    (option.Keyword != "sslmode" &&
                     option.Keyword != "certificatefile" &&
                     option.Keyword != "certificatepassword" &&
                     option.Keyword != "sslcrl" &&
                     option.Keyword != "sslca" &&
                     option.Keyword != "sslcert" &&
                     option.Keyword != "sslkey" &&
                     option.Keyword != "server" &&
                     option.Keyword != "tlsversion" &&
                     option.Keyword != "dns-srv"))
                {
                    continue;
                }

                // SSL connection options can't be duplicated.
                if (usedSslOptions.Contains(option.Keyword) && option.Keyword != "server" &&
                    option.Keyword != "tlsversion" && option.Keyword != "dns-srv")
                {
                    throw new ArgumentException(string.Format(Resources.DuplicatedSslConnectionOption, keyword));
                }
                else if (usedSslOptions.Contains(option.Keyword))
                {
                    throw new ArgumentException(string.Format(Resources.DuplicatedConnectionOption, keyword));
                }

                // SSL connection options can't be used if sslmode=None.
                if (option.Keyword == "sslmode" && (value == "none" || value == "disabled"))
                {
                    sslModeIsNone = true;
                }

                if (sslModeIsNone &&
                    (option.Keyword == "certificatefile" ||
                     option.Keyword == "certificatepassword" ||
                     option.Keyword == "sslcrl" ||
                     option.Keyword == "sslca" ||
                     option.Keyword == "sslcert" ||
                     option.Keyword == "sslkey"))
                {
                    throw new ArgumentException(Resources.InvalidOptionWhenSslDisabled);
                }

                // Preferred is not allowed for the X Protocol.
                if (isXProtocol && option.Keyword == "sslmode" && (value == "preferred" || value == "prefered"))
                {
                    throw new ArgumentException(string.Format(Resources.InvalidSslMode, keyValue[1]));
                }

                if (option.Keyword == "sslca" || option.Keyword == "certificatefile")
                {
                    usedSslOptions.Add("sslca");
                    usedSslOptions.Add("certificatefile");
                }
                else
                {
                    usedSslOptions.Add(option.Keyword);
                }
            }
        }
        static MySqlConnectionStringOption()
        {
            s_options = new Dictionary<string, MySqlConnectionStringOption>(StringComparer.OrdinalIgnoreCase);

            AddOption(Server = new MySqlConnectionStringOption<string>(
                keys: new[] { "Server", "Host", "Data Source", "DataSource", "Address", "Addr", "Network Address" },
                defaultValue: ""));

            AddOption(UserID = new MySqlConnectionStringOption<string>(
                keys: new[] { "User Id", "UserID", "Username", "Uid", "User name", "User" },
                defaultValue: ""));

            AddOption(Password = new MySqlConnectionStringOption<string>(
                keys: new[] { "Password", "pwd" },
                defaultValue: ""));

            AddOption(Database = new MySqlConnectionStringOption<string>(
                keys: new[] { "Database", "Initial Catalog" },
                defaultValue: ""));

            AddOption(Port = new MySqlConnectionStringOption<uint>(
                keys: new[] { "Port" },
                defaultValue: 3306u));

            AddOption(AllowUserVariables = new MySqlConnectionStringOption<bool>(
                keys: new[] { "AllowUserVariables", "Allow User Variables" },
                defaultValue: false));

            AddOption(CharacterSet = new MySqlConnectionStringOption<string>(
                keys: new[] { "CharSet", "Character Set", "CharacterSet" },
                defaultValue: ""));

            AddOption(ConvertZeroDateTime = new MySqlConnectionStringOption<bool>(
                keys: new[] { "Convert Zero Datetime", "ConvertZeroDateTime" },
                defaultValue: false));

            AddOption(OldGuids = new MySqlConnectionStringOption<bool>(
                keys: new[] { "Old Guids", "OldGuids" },
                defaultValue: false));

            AddOption(PersistSecurityInfo = new MySqlConnectionStringOption<bool>(
                keys: new[] { "Persist Security Info", "PersistSecurityInfo" },
                defaultValue: false));

            AddOption(UseCompression = new MySqlConnectionStringOption<bool>(
                keys: new[] { "Compress", "Use Compression", "UseCompression" },
                defaultValue: false));

            AddOption(Pooling = new MySqlConnectionStringOption<bool>(
                keys: new[] { "Pooling" },
                defaultValue: true));

            AddOption(ConnectionReset = new MySqlConnectionStringOption<bool>(
                keys: new[] { "Connection Reset", "ConnectionReset" },
                defaultValue: true));

            AddOption(MinimumPoolSize = new MySqlConnectionStringOption<uint>(
                keys: new[] { "Minimum Pool Size", "Min Pool Size", "MinimumPoolSize", "minpoolsize" },
                defaultValue: 0));

            AddOption(MaximumPoolSize = new MySqlConnectionStringOption<uint>(
                keys: new[] { "Maximum Pool Size", "Max Pool Size", "MaximumPoolSize", "maxpoolsize" },
                defaultValue: 100));
        }
        /// <summary>
        /// Analyzes the connection string for potential duplicated or invalid connection options.
        /// </summary>
        /// <param name="connectionString">Connection string.</param>
        internal void AnalyzeConnectionString(string connectionString, bool isXProtocol)
        {
            string[]      queries        = connectionString.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
            List <string> usedSslOptions = new List <string>();
            bool          sslModeIsNone  = false;

            foreach (string query in queries)
            {
                string[] keyValue = query.Split('=');
                if (keyValue.Length % 2 != 0)
                {
                    continue;
                }

                var keyword = keyValue[0].ToLowerInvariant().Trim();
                var value   = keyValue[1].ToLowerInvariant();
                MySqlConnectionStringOption option = Options.Options.Where(o => o.Keyword == keyword || (o.Synonyms != null && o.Synonyms.Contains(keyword))).FirstOrDefault();
                if (option == null ||
                    (option.Keyword != "sslmode" &&
                     option.Keyword != "certificatefile" &&
                     option.Keyword != "certificatepassword" &&
                     option.Keyword != "sslcrl" &&
                     option.Keyword != "sslca" &&
                     option.Keyword != "sslcert" &&
                     option.Keyword != "sslkey"))
                {
                    continue;
                }

                // SSL connection options can't be duplicated.
                if (usedSslOptions.Contains(option.Keyword))
                {
                    throw new ArgumentException(string.Format(Resources.DuplicatedSslConnectionOption, keyword));
                }

                // SSL connection options can't be used if sslmode=None.
                if (option.Keyword == "sslmode" && (value == "none" || value == "disabled"))
                {
                    sslModeIsNone = true;
                }

                if (sslModeIsNone &&
                    (option.Keyword == "certificatefile" ||
                     option.Keyword == "certificatepassword" ||
                     option.Keyword == "sslcrl" ||
                     option.Keyword == "sslca" ||
                     option.Keyword == "sslcert" ||
                     option.Keyword == "sslkey"))
                {
                    throw new ArgumentException(Resources.InvalidOptionWhenSslDisabled);
                }

                // Preferred is not allowed for the X Protocol.
                if (isXProtocol && option.Keyword == "sslmode" && (value == "preferred" || value == "prefered"))
                {
                    throw new ArgumentException(string.Format(Resources.InvalidSslMode, keyValue[1]));
                }

                if (option.Keyword == "sslca" || option.Keyword == "certificatefile")
                {
                    usedSslOptions.Add("sslca");
                    usedSslOptions.Add("certificatefile");
                }
                else
                {
                    usedSslOptions.Add(option.Keyword);
                }
            }
        }
        public override bool ContainsKey(string keyword)
        {
            MySqlConnectionStringOption option = Options.Get(keyword);

            return(option != null);
        }
 private static void AddOption(MySqlConnectionStringOption option)
 {
     foreach (string key in option.m_keys)
         s_options.Add(key, option);
 }
 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);
 }
 internal void SetValue(MySqlConnectionStringBuilder msb, MySqlConnectionStringOption sender, object value)
 {
     sender.ValidateValue(ref value);
     msb.SetValue(sender.Keyword, Convert.ChangeType(value, sender.BaseType));
 }
 internal object GetUseprocedurebodies(MySqlConnectionStringBuilder msb, MySqlConnectionStringOption sender)
 {
     return((bool)msb.values["useprocedurebodies"]);
 }
 internal object GetValue(MySqlConnectionStringBuilder msb, MySqlConnectionStringOption sender)
 {
     return(msb.values[sender.Keyword]);
 }
 public override object this[string keyword]
 {
     get { MySqlConnectionStringOption opt = GetOption(keyword); return(opt.BaseGetter(this, opt)); }
     set { MySqlConnectionStringOption opt = GetOption(keyword); opt.BaseSetter(this, opt, value); }
 }