Пример #1
0
        //
        /// <summary>
        /// Default Constructor for the machine. The constructor loads the files and populates the inventory. It also resets the sales log
        /// </summary>
        public VirtualVendingMachine()
        {
            // load it up!
            string directory = Environment.CurrentDirectory;
            string fullPath  = Path.Combine(directory, "vendingmachine.csv");

            inventory = FileFunctions.LoadMachine(fullPath);
            FileFunctions.ResetLog();
        }
Пример #2
0
 /// <summary>
 /// Overloaded constructor to take in a file path incase we need a different file
 /// </summary>
 /// <param name="fullPath">Full path to inventory file</param>
 public VirtualVendingMachine(string fullPath)
 {
     inventory = FileFunctions.LoadMachine(fullPath);
     FileFunctions.ResetLog();
 }