ReadProducts() public method

Reads products from low Id to high Id from the baked in CSV file
public ReadProducts ( int lowId, int highId ) : IEnumerable
lowId int
highId int
return IEnumerable
        protected override async Task RunAsync(CancellationToken cancellationToken)
        {
            Logger.Debug(nameof(this.RunAsync));

            try
            {
                if (this.Partition.PartitionInfo.Kind != ServicePartitionKind.Int64Range)
                {
                    throw new ApplicationException("Partition kind is not Int64Range");
                }

                Int64RangePartitionInformation partitionInfo = (Int64RangePartitionInformation) this.Partition.PartitionInfo;
                int lowId = (int) partitionInfo.LowKey;
                int highId = (int) partitionInfo.HighKey;

                //bulk-import test data from CSV files
                Logger.Debug("attempting to bulk-import data");

                //get or create the "products" dictionary
                this.productsCollection =
                    await this.StateManager.GetOrAddAsync<IReliableDictionary<int, Product>>(ProductsCollectionName);
                //get or create the purchaseLog collection
                this.purchaseLog =
                    await this.StateManager.GetOrAddAsync<IReliableDictionary<string, ProductPurchase>>(OrdersCollectionName);

                if (!TimeSpan.TryParse(ConfigurationHelper.ReadValue("AppSettings", "ProcessOrdersInterval"), out this.processOrdersInterval))
                {
                    this.processOrdersInterval = TimeSpan.FromSeconds(3);
                }

                //check if data has been imported
                using (ITransaction tx = this.StateManager.CreateTransaction())
                {
                    if (await this.productsCollection.GetCountAsync(tx) <= 0)
                    {
                        Logger.Debug("Importing products with productId from {0} to {1}...", lowId, highId);

                        //bulk-import the data
                        BulkDataSource dataSource = new BulkDataSource();
                        foreach (Product p in dataSource.ReadProducts(lowId, highId))
                        {
                            await this.productsCollection.AddAsync(tx, p.ProductId, p);
                        }

                        await tx.CommitAsync();
                    }
                }

                // launch watcher thread
                await this.DispatchPurchaseLogAsync(cancellationToken);
            }
            catch (Exception ex)
            {
                Logger.Error(ex, nameof(this.RunAsync));
                throw;
            }
        }