public DesignConnection(string connectionName, System.Data.Design.ConnectionString cs, string provider) { this.properties = new HybridDictionary(); this.modifier = MemberAttributes.Assembly; this.name = connectionName; this.connectionStringObject = cs; this.provider = provider; }
public DesignConnection(string connectionName, System.Data.Design.ConnectionString cs, string provider) { this.properties = new HybridDictionary(); this.modifier = MemberAttributes.Assembly; this.name = connectionName; this.connectionStringObject = cs; this.provider = provider; }
public DesignConnection(string connectionName, IDbConnection conn) { this.properties = new HybridDictionary(); this.modifier = MemberAttributes.Assembly; if (conn == null) { throw new ArgumentNullException("conn"); } this.name = connectionName; DbProviderFactory factoryFromType = ProviderManager.GetFactoryFromType(conn.GetType(), ProviderManager.ProviderSupportedClasses.DbConnection); this.provider = ProviderManager.GetInvariantProviderName(factoryFromType); this.connectionStringObject = new System.Data.Design.ConnectionString(this.provider, conn.ConnectionString); }
public DesignConnection(string connectionName, IDbConnection conn) { this.properties = new HybridDictionary(); this.modifier = MemberAttributes.Assembly; if (conn == null) { throw new ArgumentNullException("conn"); } this.name = connectionName; DbProviderFactory factoryFromType = ProviderManager.GetFactoryFromType(conn.GetType(), ProviderManager.ProviderSupportedClasses.DbConnection); this.provider = ProviderManager.GetInvariantProviderName(factoryFromType); this.connectionStringObject = new System.Data.Design.ConnectionString(this.provider, conn.ConnectionString); }