public FlatFileSource(string name, FlatFileConnectionManager connectionManager) : this() { this.Name = name; this.Description = name; this.ConnectionManager = connectionManager; }
private static void CreateConnectionManager(IConnectionManagerContainer connectionManagerContainer, Connection connection) { if (connectionManagerContainer == null) { throw new ArgumentNullException(nameof(connectionManagerContainer), "Connection can't be added to a null project or package!"); } ConnectionManagerWrapper connectionManagerWrapper; switch (connection) { case FlatFileConnection flatFileConnection: connectionManagerWrapper = FlatFileConnectionManager.CreateConnectionManager(connectionManagerContainer, flatFileConnection); break; case OleDbConnection _: connectionManagerWrapper = new OleDbConnectionManagerWrapper(connectionManagerContainer, connection.Name, connection.ConnectionString, connection.GUID); break; case CustomConnection customConnection: connectionManagerWrapper = new CustomConnectionManagerWrapper(connectionManagerContainer, connection.Name, connection.ConnectionString, connection.GUID, customConnection.CreationName); break; default: throw new ArgumentException($"Connection manager {connection.Name} is of an invalid type!"); } connectionManagerWrapper.DelayValidation = connection.DelayValidation; AddExpressions(connectionManagerWrapper, connection.PropertyExpressions); connectionManagerContainer.AddConnectionManagerWrapper(connectionManagerWrapper); }
public FlatFileSource(string name, FlatFileConnectionManager connectionManager, bool retainNulls) : this(name, connectionManager) { this.RetainNulls = retainNulls; }