Exemplo n.º 1
0
        /// <summary>
        /// Reads PFB OSM data from a stream.
        /// </summary>
        /// <param name="consumer">The consumer to send the data to.</param>
        public void ReadAll(IPBFPrimitiveBlockConsumer consumer)
        {
            // check parameters.
            if (consumer == null)
            {
                throw new ArgumentNullException("consumer");
            }

            // start processing.
            PrimitiveBlock block = this.MoveNext();

            while (block != null)
            {
                // report the next block to the consumer.
                consumer.ProcessPrimitiveBlock(block);

                // move to the next block.
                block = this.MoveNext();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Reads PFB OSM data from a stream.
        /// </summary>
        /// <param name="consumer">The consumer to send the data to.</param>
        public void ReadAll(IPBFPrimitiveBlockConsumer consumer)
        {
            // check parameters.
            if (consumer == null)
            {
                throw new ArgumentNullException("consumer");
            }

            // start processing.
            PrimitiveBlock block = this.MoveNext();
            while (block != null)
            {
                // report the next block to the consumer.
                consumer.ProcessPrimitiveBlock(block);

                // move to the next block.
                block = this.MoveNext();
            }
        }