private void cbConfigs_SelectedIndexChanged(object sender, EventArgs e) { XmlNode xnConfig = xnConnectionStrings.SelectSingleNode("add[@name=\"" + cbConfigs.SelectedItem + "\"]"); HKHConnectionStringElement hse = new HKHConnectionStringElement(xnConfig.Attributes["name"].Value, xnConfig.Attributes["connectionString"].Value); //set encryption if (xnConfig.Attributes["encrypt"] != null && xnConfig.Attributes["encrypt"].Value.ToLower() == "true") { hse.Encrypt = true; } if (xnConfig.Attributes["algo"] != null) { hse.Algo = xnConfig.Attributes["algo"].Value; } encryption = hse.GetEncryptionAlgo(); }
/// <summary> /// Get special Instance of IDataProvider /// </summary> /// <param name="dbConfiguration"></param> /// <returns></returns> public static IDataProvider GetInstance(HKHConnectionStringElement dbConfiguration) { IDataProvider dataProvider = null; if (!dataProviders.TryGetValue(dbConfiguration.Name, out dataProvider)) { lock (typeof(DataBaseObjectBuilderFactory)) { if (!dataProviders.TryGetValue(dbConfiguration.Name, out dataProvider)) { dataProvider = new DataProvider(DataBaseObjectBuilderFactory.GetDataBaseObjectBuilder(dbConfiguration)); dataProviders.TryAdd(dbConfiguration.Name, dataProvider); } } } return(dataProvider); }
public SqlDatabaseObjectBuilder(HKHConnectionStringElement configuration) : base(configuration) { InitRetryPolicy(); }
protected DataBaseObjectBuilder(string connectionString) : base(connectionString) { this.configuration = HKHConnectionStringElement.Null; }
protected DataBaseObjectBuilder(HKHConnectionStringElement configuration) : base(configuration.ConnectionString) { this.configuration = configuration; }
public SqlServerObjectBuilder(HKHConnectionStringElement configuration) : base(configuration) { }
public OleDbObjectBuilder(HKHConnectionStringElement configuration) : base(configuration) { }
public TransactionController(HKHConnectionStringElement dbConfiguration) : this(DataBaseObjectBuilderFactory.GetDataBaseObjectBuilder(dbConfiguration)) { }
/// <summary> /// Get special Instance of IDataBaseObjectBuilder /// </summary> /// <param name="dbConfigName"></param> /// <param name="Conn"></param> /// <param name="Trans"></param> /// <returns></returns> internal static IDataBaseObjectBuilder GetDataBaseObjectBuilder(HKHConnectionStringElement dbConfiguration) { return(GetDataBaseObjectBuilder(Type.GetType(dbConfiguration.Builder), dbConfiguration.ConnectionString)); }