Ejemplo n.º 1
0
        public void UpdateInventoryProcess(List <Item> Items)
        {
            Console.WriteLine("Updating inventory");
            _updateInventory.Update(Items);
            Console.WriteLine("Inventory update complete");

            var filename        = $"inventory_{DateTime.Now:yyyyddMM-HHmmss}.txt";
            var inventoryOutput = JsonConvert.SerializeObject(Items, Formatting.Indented);

            File.WriteAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, filename), inventoryOutput);
        }