Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            // Load users from data file
            List<User> users = JsonConvert.DeserializeObject<List<User>>(File.ReadAllText(@"Data/Users.json"));

            // Load products from data file
            List<Product> products = JsonConvert.DeserializeObject<List<Product>>(File.ReadAllText(@"Data/Products.json"));

            DataManager dataManager = new DataManager(users, products);
            WriteWelcomeToTUSCMessage();

            User loggedInUser = LoginManager.LogIn(users);
            if (loggedInUser != null)
            {
                Store store = new Store(loggedInUser, dataManager);

                Tusc tusc = new Tusc(loggedInUser, store);
                tusc.Run();
            }
        }
Ejemplo n.º 2
0
 public Store(User user, DataManager dataManager)
 {
     this.user = user;
     this.dataManager = dataManager;
 }