/// <summary> /// Inserts table data from the reader to the current SqlAgent instance, /// </summary> /// <param name="table">a schema of the table to insert the data to</param> /// <param name="reader">an IDataReader to read the table data from.</param> /// <remarks>Required for <see cref="CloneDatabase">CloneDatabase</see> infrastructure. /// The insert is performed using a transaction that is already initiated by the /// <see cref="CloneDatabase">CloneDatabase</see>.</remarks> protected abstract Task <long> InsertTableDataAsync(DbTableSchema table, IDataReader reader, long totalRowCount, long currentRow, int currentProgress, IProgress <DbCloneProgressArgs> progress, CancellationToken ct);
/// <summary> /// Invokes protected <see cref="InsertTableData">InsertTableData</see> /// method on target SqlAgent. Used to bypass cross instance protected method /// access limitation. /// </summary> /// <param name="target">the SqlAgent to invoke the <see cref="InsertTableData">InsertTableData</see> /// method on</param> /// <param name="table">a schema of the table to insert the data to</param> /// <param name="reader">an IDataReader to read the table data from</param> /// <remarks>Required for <see cref="CloneDatabase">CloneDatabase</see> infrastructure. /// The insert is performed using a transaction that is already initiated by the /// <see cref="CloneDatabase">CloneDatabase</see>.</remarks> protected static Task <long> CallInsertTableDataAsync(SchemaManagerBase target, DbTableSchema table, IDataReader reader, long totalRowCount, long currentRow, int currentProgress, IProgress <DbCloneProgressArgs> progress, CancellationToken ct) { return(target.InsertTableDataAsync(table, reader, totalRowCount, currentRow, currentProgress, progress, ct)); }