Exemple #1
0
 public AccountService(IAccountDAO accountDAO, ISessionWrapper sessionWrapper, IEmail email, IUserSession userSession)
 {
     this.accountDAO     = accountDAO;
     this.sessionWrapper = sessionWrapper;
     this.email          = email;
     this.userSession    = userSession;
 }
Exemple #2
0
 public AlertController(IAlertDAO alertDAO, IUserSession userSession, IAccountDAO accountDAO, IAccountPermissionDAO accountPermissionDAO)
 {
     this.alertDAO             = alertDAO;
     this.userSession          = userSession;
     this.accountDAO           = accountDAO;
     this.accountPermissionDAO = accountPermissionDAO;
 }
Exemple #3
0
 public DAOFactory()
 {
     if (_accountDAO == null)
     {
         _accountDAO = new MySQL.AccountDAO();
     }
 }
        //private readonly int authID;


        public TransferService(IAccountDAO _accountDAO, IUserDAO _userDAO, ITransferDAO _transferDAO)
        {
            accountDAO  = _accountDAO;
            userDAO     = _userDAO;
            transferDAO = _transferDAO;
            //authID = GetUserID();
        }
Exemple #5
0
 public LoginController(ITokenGenerator _tokenGenerator, IPasswordHasher _passwordHasher, IUserDAO _userDAO, ITransferDAO _transferDAO, IAccountDAO _accountDAO)
 {
     tokenGenerator = _tokenGenerator;
     passwordHasher = _passwordHasher;
     userDAO        = _userDAO;
     transferDAO    = _transferDAO;
     accountDAO     = _accountDAO;
 }
 public AccountController(IAccountDAO _accountDAO, IUserDAO _userDAO)
 {
     //tokenGenerator = _tokenGenerator;
     //passwordHasher = _passwordHasher;
     userDAO = _userDAO;
     // accountDAO = new AccountSqlDAO();
     accountDAO = _accountDAO;
 }
Exemple #7
0
        public DAOFactory()
        {

            if (_accountDAO == null)
            {
                _accountDAO = new MySQL.AccountDAO();
            }

        }
 public AdminController(IAccountDAO accountDAO, IUserSession userSession, IAccountPermissionDAO accountPermissionDAO, IProfileDAO profileDAO, IFriendDAO friendDAO, IAlertService alertService)
 {
     this.accountDAO           = accountDAO;
     this.userSession          = userSession;
     this.accountPermissionDAO = accountPermissionDAO;
     this.profileDAO           = profileDAO;
     this.friendDAO            = friendDAO;
     this.alertService         = alertService;
 }
Exemple #9
0
 public PermissionController(IAccountPermissionDAO accountPermissionDAO, IUserSession userSession, IAccountDAO accountDAO,
                             IAlertService alertService, IProfileDAO profileDAO)
 {
     this.accountPermissionDAO = accountPermissionDAO;
     this.accountDAO           = accountDAO;
     this.userSession          = userSession;
     this.alertService         = alertService;
     this.profileDAO           = profileDAO;
 }
Exemple #10
0
 public StatusUpdateController(IStatusUpdateDAO statusUpdateDAO, IUserSession userSession, IProfileDAO profileDAO, IAccountDAO accountDAO, IAccountPermissionDAO accountPermissionDAO, IAlertService alertService)
 {
     this.statusUpdateDAO      = statusUpdateDAO;
     this.userSession          = userSession;
     this.profileDAO           = profileDAO;
     this.accountDAO           = accountDAO;
     this.accountPermissionDAO = accountPermissionDAO;
     this.alertService         = alertService;
 }
        static DependencyResolver()
        {
            _awardDAO   = new JsonAwardDAO();
            _userDAO    = new JsonUserDAO();
            _accountDAO = new JsonAccountDAO();

            _userLogic    = new UserManager(_userDAO, _awardDAO);
            _awardLogic   = new AwardManager(_awardDAO, _userDAO);
            _accountLogic = new AccountManager(_accountDAO);
        }
Exemple #12
0
 //private AccountDAOEntityFW _accountDAOEntity;
 public AccountOperations(int typeOfDBOperation)
 {
     if (typeOfDBOperation == 1)
     {
         _accountDAO = new AccountDAO();
     }
     else if (typeOfDBOperation == 2)
     {
         _accountDAO = new AccountDAOEntityFW();
     }
 }
        public LoginRegisterMenu(AuthService authService, IAccountDAO accountDAO, ITransferDAO transferDAO, ConsoleService consoleService)
        {
            this.authService    = authService;
            this.accountDAO     = accountDAO;
            this.transferDAO    = transferDAO;
            this.consoleService = consoleService;

            AddOption("Login", Login)
            .AddOption("Register", Register)
            .AddOption("Exit", Exit);
        }
Exemple #14
0
 public AccountController(IAccountService accountService, IAccountDAO accountDAO, IEmail emails, IConfiguration configuration, ISessionWrapper sessionWrapper, IUserSession userSession, IProfileDAO profileDAO, IAccountPermissionDAO accountPermissionDAO, IAlertService alertService)
 {
     this.accountService       = accountService;
     this.accountDAO           = accountDAO;
     this.emails               = emails;
     this.configuration        = configuration;
     this.sessionWrapper       = sessionWrapper;
     this.userSession          = userSession;
     this.profileDAO           = profileDAO;
     this.accountPermissionDAO = accountPermissionDAO;
     this.alertService         = alertService;
 }
 public ProfileController(IFriendDAO friendDAO, IFriendInvitationDAO friendInvitationDAO, IAccountDAO accountDAO, IProfileDAO profileDAO, IUserSession userSession, IJobDAO jobDAO, Profile profile, IAccountPermissionDAO accountPermissionDAO, IAlertService alertService)
 {
     this.friendDAO           = friendDAO;
     this.friendInvitationDAO = friendInvitationDAO;
     this.accountDAO          = accountDAO;
     this.profileDAO          = profileDAO;
     this.userSession         = userSession;
     this.jobDAO  = jobDAO;
     this.profile = profile;
     this.accountPermissionDAO = accountPermissionDAO;
     this.alertService         = alertService;
 }
Exemple #16
0
 public FriendController(IAccountDAO accountDAO, IProfileDAO profileDAO, IFriendDAO friendDAO, IFriendInvitationDAO friendInvitationDAO, IEmail emails, IUserSession userSession, ISessionWrapper sessionWrapper, Account _account, Account _accountToInvite)
 {
     this.accountDAO          = accountDAO;
     this.profileDAO          = profileDAO;
     this.friendDAO           = friendDAO;
     this.friendInvitationDAO = friendInvitationDAO;
     this.emails           = emails;
     this.userSession      = userSession;
     this.sessionWrapper   = sessionWrapper;
     this._account         = _account;
     this._accountToInvite = _accountToInvite;
 }
Exemple #17
0
        public MainMenu(string apiBaseUrl)
        {
            this.accountDAO  = new AccountApiDAO(apiBaseUrl);
            this.transferDAO = new TransferApiDAO(apiBaseUrl);

            AddOption("View your current balance", ViewBalance)
            .AddOption("View your past transfers", ViewTransfers)
            .AddOption("View your pending requests", ViewRequests)
            .AddOption("Send TE bucks", SendTEBucks)
            .AddOption("Request TE bucks", RequestTEBucks)
            .AddOption("Log in as different user", Logout)
            .AddOption("Exit", Exit);
        }
Exemple #18
0
        public MainMenu(string api_url)
        {
            this.accountDao  = new AccountApiDAO(api_url);
            this.transferDao = new TransferApiDAO(api_url);
            this.userDao     = new UserApiDAO(api_url);

            AddOption("View your current balance", ViewBalance)
            .AddOption("View your approved transfers", ViewTransfers)
            .AddOption("Send TE bucks", SendTEBucks)
            .AddOption("Request TE bucks", RequestTEBucks)
            .AddOption("View pending transfers", ViewPendingTransfers)
            .AddOption("Log in as different user", Logout)
            .AddOption("Exit", Exit);
        }
Exemple #19
0
        public MainMenu(string api_url)
        {
            this.accountDao  = new AccountApiDAO(api_url);
            this.transferDao = new TransferApiDAO(api_url);

            // TODO: NEED TO UPDATE THE CONSTRUCTOR TO HAVE THE DAO'S PASSED IN, AND SET THEM IN THE CONSTRUCTOR
            AddOption("View your current balance", ViewBalance)
            .AddOption("View your past transfers", ViewTransfers)  // case 5 and 6
            .AddOption("View your pending requests", ViewRequests) // case 8 and 9
            .AddOption("Send TE bucks", SendTEBucks)               // case 4
            .AddOption("Request TE bucks", RequestTEBucks)         // case 7
            .AddOption("Log in as different user", Logout)
            .AddOption("Exit", Exit);
        }
Exemple #20
0
 public AccountController(IAccountDAO accountDAO, IUserDAO userDAO, ITransferDAO transferDAO)
 {
     if (_accountDAO == null)
     {
         _accountDAO = accountDAO;
     }
     if (_userDAO == null)
     {
         _userDAO = userDAO;
     }
     if (_transferDAO == null)
     {
         _transferDAO = transferDAO;
     }
 }
Exemple #21
0
        public MainMenu(IAccountDAO accountDAO, ITransferDAO transferDAO, AuthService authService, ConsoleService consoleService)
        {
            this.accountDAO     = accountDAO;
            this.transferDAO    = transferDAO;
            this.authService    = authService;
            this.consoleService = consoleService;

            AddOption("View your account details", ViewAccount)
            .AddOption("View your past transfers", ViewTransfers)
            .AddOption("View a specific transfer", ViewTransfer)
            .AddOption("Send TE bucks", SendTEBucks)
            //.AddOption("Request TE bucks", RequestTEBucks)
            .AddOption("Log in as different user", Logout)
            .AddOption("Exit", Exit);
        }
Exemple #22
0
 public AccountController(IAccountDAO accountdao, ITransferDAO transferDAO)
 {
     AccountDAO  = accountdao;
     TransferDAO = transferDAO;
 }
Exemple #23
0
 public AccountService(IAccountDAO accountDAO)
 {
     _accountDAO = accountDAO;
 }
Exemple #24
0
 public UsersController(IAccountDAO accountDAO, IUserDAO userDAO, ITransferDAO transferDAO)
 {
     this.AccountDAO  = accountDAO;
     this.UserDAO     = userDAO;
     this.TransferDAO = transferDAO;
 }
Exemple #25
0
 public TransferController(ITransferDAO _transferDAO, IUserDAO _userDAO, IAccountDAO _accountDAO)
 {
     transferDAO = _transferDAO;
     userDAO     = _userDAO;
     accountDAO  = _accountDAO;
 }
Exemple #26
0
 public MoneyController(IAccountDAO accountDAO, IUserDAO userDAO, ITransferDAO transferDAO)
 {
     this.transferDAO = transferDAO;
     this.accountDAO = accountDAO;
     this.userDAO = userDAO;
 }
 public TransactionController(IAccountDAO _accountDAO, ITransferDAO _transferDAO, IUserDAO _userDAO)
 {
     accountDAO  = _accountDAO;
     transferDAO = _transferDAO;
     userDAO     = _userDAO;
 }
 public TransfersController(ITransferDAO transferDAO, IAccountDAO accountDAO)
 {
     this.TransferDAO = transferDAO;
     this.AccountDAO  = accountDAO;
 }
 public TransferController(IAccountDAO _accountDAO, ITransferDAO _transferDAO)
 {
     accountDAO  = _accountDAO;
     transferDAO = _transferDAO;
 }
 public AccountsController(IAccountDAO accountDAO)
 {
     this.AccountDAO = accountDAO;
 }
 public TransfersController(ITransferDAO _transferDAO, IAccountDAO _accountDAO)
 {
     transferDAO = _transferDAO;
     accountDAO  = _accountDAO;
 }