internal int UpdatePrices(string priceFullXmlFilePath, BackgroundWorker worker, DoWorkEventArgs e, ProgressBar progressBar) { PriceFullXmlDecoder xmlDecoder = new PriceFullXmlDecoder(); ICollection <Price> pricesList = xmlDecoder.DecodePricesFromFile(priceFullXmlFilePath); int pricesNum = InsertPricesIntoCatalog(pricesList, worker, e, progressBar); return(pricesNum); }
static void TestGetPricesFromXml(int limit) { PriceFullXmlDecoder decoder = new PriceFullXmlDecoder(); string priceFullXmlFilePath = $@"{Constants.XmlPriceFullDirPath}\PriceFull7290027600007-125-201608160341.xml"; ICollection <Price> pricesList = decoder.DecodePricesFromFile(priceFullXmlFilePath); int i = 0; foreach (var price in pricesList) { Console.WriteLine(price); i++; if (i == limit) { return; } } }