Ejemplo n.º 1
0
        public static void Read(
            Catalog catalog,
            IDataReader reader)
        {
            var factory = new SchemaFactory(reader);

            while (reader.Read())
            {
                factory.CreateSchema(catalog, reader);
            }
        }
Ejemplo n.º 2
0
        public static async Task ReadAsync(
            Catalog catalog,
            DbDataReader reader,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            var factory = new SchemaFactory(reader);

            while (await reader.ReadAsync(cancellationToken))
            {
                cancellationToken.ThrowIfCancellationRequested();
                factory.CreateSchema(catalog, reader);
            }
        }