Пример #1
0
        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);
            }
        }
Пример #2
0
        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);
            }
        }