Example #1
0
        static DependencyResolver()
        {
            switch (ConfigurationManager.AppSettings["DAL"])
            {
            case "Memory":
                _userDao           = new UserOnMemoryDAO();
                _awardDao          = new AwardOnMemoryDAO();
                _usersAndAwardsDao = new UsersAndAwardsOnMemoryDAO();
                break;

            case "File":
                _userDao            = new UserOnFileDAO();
                _awardDao           = new AwardOnFileDAO();
                _usersAndAwardsDao  = new UsersAndAwardsOnFileDAO();
                _webUserDao         = new WebUserFileDao();
                _userRoleDao        = new UserRoleFileDAO();
                _imagesDao          = new ImagesDAO();
                _usersAndImagesDao  = new UsersAndImagesOnFileDAO();
                _awardsAndImagesDao = new AwardsAndImagesDAO();
                break;

            case "Database":
                _userDao            = new UserDatabaseDAO();
                _awardDao           = new AwardDatabaseDAO();
                _usersAndAwardsDao  = new UsersAndAwardsDatabaseDAO();
                _webUserDao         = new WebUserDatabaseDAO();
                _userRoleDao        = new UserRoleDatabaseDAO();
                _imagesDao          = new ImagesDatabaseDAO();
                _usersAndImagesDao  = new UsersAndImagesDatabaseDAO();
                _awardsAndImagesDao = new AwardsAndImagesDatabaseDAO();
                break;
            }

            _usersAndAwardsLogic  = new UsersAndAwardsLogic(_usersAndAwardsDao);
            _webUserLogic         = new WebUserLogic(_webUserDao);
            _userRoleLogic        = new UserRoleLogic(_userRoleDao);
            _usersAndImagesLogic  = new UsersAndImagesLogic(_usersAndImagesDao);
            _awardsAndImagesLogic = new AwardsAndImagesLogic(_awardsAndImagesDao);
            _userLogic            = new UserLogic(_userDao, _usersAndAwardsDao, _usersAndImagesLogic);
            _awardLogic           = new AwardLogic(_awardDao, _usersAndAwardsDao, _awardsAndImagesLogic);
            _imagesLogic          = new ImagesLogic(_imagesDao, _usersAndImagesLogic, _awardsAndImagesLogic);
        }
Example #2
0
 public UserLogic(IUserDAO userDao, IUsersAndAwardsDAO usersAndAwardsDao, IUsersAndImagesLogic usersAndImagesLogic)
 {
     this._userDao             = userDao;
     this._usersAndAwardsDao   = usersAndAwardsDao;
     this._usersAndImagesLogic = usersAndImagesLogic;
 }
Example #3
0
 public AwardLogic(IAwardDAO awardDao, IUsersAndAwardsDAO usersAndAwardsDao)
 {
     this._awardDao          = awardDao;
     this._usersAndAwardsDao = usersAndAwardsDao;
 }
Example #4
0
 public UsersAndAwardsLogic(IUsersAndAwardsDAO usersAndAwardsDAO)
 {
     _usersAndAwardsDao = usersAndAwardsDAO;
 }
Example #5
0
 public UsersAwardsManager(IUsersAndAwardsDAO usersandawardsDao)
 {
     _usersandawardsDao = usersandawardsDao;
 }
Example #6
0
 public UserLogic(IUserDAO userDao, IUsersAndAwardsDAO usersAndAwardsDao)
 {
     this._userDao           = userDao;
     this._usersAndAwardsDao = usersAndAwardsDao;
 }
Example #7
0
 public AwardLogic(IAwardDAO awardDao, IUsersAndAwardsDAO usersAndAwardsDao, IAwardsAndImagesLogic awardsAndImagesLogic)
 {
     this._awardDao             = awardDao;
     this._usersAndAwardsDao    = usersAndAwardsDao;
     this._awardsAndImagesLogic = awardsAndImagesLogic;
 }