public DbConnectException(Exception InnerException, NameValueList Config) : base(string.Empty, InnerException) { this.ConnectionString = Config.Get <string>("ConnectionString"); this.DbProviderFactory = Config.Get <DbProviderFactory>("DbProviderFactory"); this.DbAdapter = Config.Get <IDbAdapter>("DbAdapter"); }
public DbConnectException(Exception InnerException, NameValueList Config) : base(string.Empty, InnerException) { this.ConnectionString = Config.Get<string>("ConnectionString"); this.DbProviderFactory = Config.Get<DbProviderFactory>("DbProviderFactory"); this.DbAdapter = Config.Get<IDbAdapter>("DbAdapter"); }
protected void SetByAppSettings(NameValueList Data, string Key, Object DefaultValue) { if (Data == null) { Data = OriData; } Data[Key] = ConfigurationManager.AppSettings[Key]; if (string.IsNullOrEmpty(Data.Get <string>(Key))) { Data[Key] = DefaultValue; } }