Exemple #1
0
        private static void Main()
        {
            usersLogic      = DependencyResolver.UsersLogic;
            awardsLogic     = DependencyResolver.AwardsLogic;
            awardUsersLogic = DependencyResolver.AwardUsersLogic;

            Console.WriteLine("Greetings! You are using The User Creating Program.");
            Console.WriteLine();

            while (true)
            {
                ShowMenu();
                string choice = ReadMenuChoice();
                switch (choice)
                {
                case "user list":
                    ShowAllUsers();
                    break;

                case "award list":
                    ShowAllAwards();
                    break;

                case "add user":
                    AddNewUser();
                    break;

                case "add award":
                    AddNewAward();
                    break;

                case "award user":
                    AwardUser();
                    break;

                case "remove user":
                    RemoveUser();
                    break;

                case "remove award":
                    RemoveAward();
                    break;

                case "remove all users":
                    RemoveAllUsers();
                    break;

                case "remove all awards":
                    RemoveAllAwards();
                    break;

                case "quit":
                    return;

                default:
                    break;
                }
            }
        }
Exemple #2
0
        static void Main(string[] args)
        {
            usersLogic      = DependencyResolver.UsersLogic;
            awardUsersLogic = DependencyResolver.AwardUsersLogic;
            awardsLogic     = DependencyResolver.AwardsLogic;


            while (true)
            {
                ConsoleLogic.Run();
            }
        }
 public UsersLogic(IUsersDao usersDao, ICacheLogic cacheLogic, IAwardUsersLogic awardUsersLogic)
 {
     this.usersDao        = usersDao;
     this.cacheLogic      = cacheLogic;
     this.awardUsersLogic = awardUsersLogic;
 }
 public UsersLogic(IUsersDAO usersDAO, ICacheLogic cacheLogic, IAwardUsersLogic awardUsersLogic)
 {
     this.awardUsersLogic = awardUsersLogic;
     this.cacheLogic      = cacheLogic;
     this.usersDAO        = usersDAO;
 }