Advertisement
brunobozic

What the hell is this

Sep 27th, 2022
1,171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.31 KB | None | 0 0
  1. List<string> products = new List<string>();
  2.                 foreach (var filePath in filePaths)
  3.                 {
  4.                     try
  5.                     {
  6.                         var productCollection = DeserializeStore
  7.                             (
  8.                                 filePath => ExtractPath(),
  9.                                 dataFeed.FeedFormat => TranformFeed(
  10.                                     filePath,
  11.                                     parsingModel,
  12.                                     storeProducts,
  13.                                     store,
  14.                                     products
  15.                                 ),
  16.                                 parsingModel => ExtractParsingModel(
  17.                                     store,
  18.                                     dataDeed.Feed
  19.                                 ),
  20.                                 store1 => ImportProducts
  21.                                     (
  22.                                         store1.ProductsCollection.Products,
  23.                                         productDb => GetProductDb(
  24.                                             dataFeed.Store,
  25.                                             dbCtx
  26.                                         ),
  27.                                         dbCtx, // dbContext
  28.                                         log => GetLogger(
  29.                                             store1,
  30.                                             dbCtx
  31.                                         ),
  32.                                         dataFeed.DeleteProductsNotInFeed,
  33.                                         dataFeed.DeleteRule
  34.                                     )
  35.                             );
  36.  
  37.                         products.AddRange(
  38.                                 productCollection
  39.                             );
  40.                     }
  41.                     catch (Exception ex)
  42.                     {
  43.                         throw ex;
  44.                     }
  45.                     finally
  46.                     {
  47.                         if (dataFeed.FeedFormat != FeedFormat.Jeeeome)
  48.                         {
  49.                             _logger.LogInformation($"Deleting temp file: {filePath}");
  50.                             File.Delete(filePath);
  51.                         }
  52.                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement