public static void Read( Catalog catalog, Dictionary <string, UserTable> userTables, IDataReader reader) { var factory = new UserTableFactory(reader); while (reader.Read()) { factory.CreateUserTable(catalog, userTables, reader); } }
public static async Task ReadAsync( Catalog catalog, Dictionary <string, UserTable> userTables, DbDataReader reader, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); var factory = new UserTableFactory(reader); while (await reader.ReadAsync(cancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); factory.CreateUserTable(catalog, userTables, reader); } }