private DbSource(IConnectionManager connectionManager = null, Func <TOutput> createItem = null, DataflowBlockOptions options = null) : base(connectionManager, options) { typeInfo = new DbTypeInfo(typeof(TOutput)); if (createItem is null && !typeInfo.IsArray) { createItem = ItemFactory <TOutput> .CreateDefault; } this.createItem = createItem; }
public DbDestination( TableDefinition tableDefinition, IConnectionManager connectionManager = null, int batchSize = DefaultBatchSize, GroupingDataflowBlockOptions batchOptions = null, ExecutionDataflowBlockOptions executionOptions = null) : base(connectionManager, batchSize, batchOptions, executionOptions) { TableDefinition = tableDefinition ?? throw new ArgumentNullException(nameof(tableDefinition)); TypeInfo = new DbTypeInfo(typeof(TInput)); WriteBatchInTransaction = true; }