public ClientServices(IRepository repository, IClientRepository clientRepository, IAccountRepository accountRepository, IHelper helper) { _repository = repository; _clientRepository = clientRepository; _accountRepository = accountRepository; _helper = helper; }
private AccountCheckStream() { walletRepository = new WalletRepository(); accountRepository = AccountRepository.Instance; orderRepository = OrderRepository.Instance; profitCalculator = ProfitCalculator.Instance; tradeManager = ManagerTrade.Instance.tradeManager; brokerRepository = new BrokerRepository(); threadIntervalMils = AppConfig.GetIntParam("CheckLoop.Interval", 100); schedules = new[] { new Schedule(CheckOrders, AppConfig.GetIntParam("CheckLoop.IntervalOrders", 300)), new Schedule(CheckMargin, AppConfig.GetIntParam("CheckLoop.IntervalMargin", 15000)), new Schedule(CheckSwap, AppConfig.GetIntParam("CheckLoop.IntervalSwap", 1000)), new Schedule(RenewSubscriptions, AppConfig.GetIntParam("CheckLoop.UpdateSubscriptions", 1000)) }; // параметры начисления свопов var dicMetadata = brokerRepository.GetMetadataByCategory("SWAP"); object swapHourGmtObj, minutesToCheckSwapObj; if (!dicMetadata.TryGetValue("Hour.GMT", out swapHourGmtObj)) swapHourGmtObj = 21; swapCheckHourGmt = (int) swapHourGmtObj; if (!dicMetadata.TryGetValue("MinutesToCheck", out minutesToCheckSwapObj)) minutesToCheckSwapObj = 0; minutesToCheckSwap = (int)minutesToCheckSwapObj; }
public HomeController(IDataCenterRepository _centerRepository, IMaterialRepository _materialRepository, IAccountRepository _rightRepository, IManagementRepository _managementRepository) { centerService = new DataCenterService(_centerRepository); accountService = new AccountService(_rightRepository); materialService = new MaterialService(_materialRepository); managementService = new ManagementService(_managementRepository); }
protected override void Context() { _handler = Resolve<AccountHandlers>(); _accountRepository = Resolve<IAccountRepository>(); _handler.AsDynamic().Handle(new AccountCreated(_id, "John Doe BVBA", "John", "Doe", "*****@*****.**", DateTime.UtcNow) { Version = 1 }); }
public static IAccountRepository GetAccountRepo() { if (accountRepository == null) accountRepository = new AccountRepository(); return accountRepository; }
public SetupModule(IAggregateRootRepository repository, IAccountRepository accountRepository, IIdGenerator idGenerator) :base("/setup") { Get["/"] = _ => { if (accountRepository.Count() > 0) return HttpStatusCode.NotFound; return View["Index"]; }; Post["/"] = _ => { var model = this.Bind<CreateModel>(); if (accountRepository.Count() > 0) return HttpStatusCode.NotFound; var account = new Domain.Account(idGenerator.NextGuid(), model.Name, model.FirstName, model.LastName, model.Email); account.ChangePassword(model.Password); account.MakeAdmin(); repository.Save(account); return Response.AsRedirect("/"); }; }
public void SetUp() { _mockRepository = new MockRepository(); _accountRepository = _mockRepository.StrictMock<IAccountRepository>(); _transactionsRepository = _mockRepository.StrictMock<ITransactionsRepository>(); _paymentGateway = _mockRepository.StrictMock<IPaymentGateway>(); }
public AccountsController(IAccountRepository accountRepository, INotificationService notificationService, IAccountsSettingsService accountsSettingsService, IUserProfileService userProfileService) { this.accountRepository = accountRepository; this.notificationService = notificationService; this.accountsSettingsService = accountsSettingsService; this.userProfileService = userProfileService; }
public ConfirmFriendshipRequestPresenter() { _webContext = new SPKTCore.Core.Impl.WebContext(); _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository(); _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository(); _redirector = new SPKTCore.Core.Impl.Redirector(); }
public AccountServices(IAccountRepository accountRepository, PredictabullWebRequest predictabullWebRequest) { _siteHome = "service.predict-a-bull.com/api"; //_siteHome = "localhost:49573/api"; _predictabullWebRequest = new PredictabullWebRequest(); _accountRepository = accountRepository; }
public JobController() { this.profileRepo = new ProfileRepository(new MVCEntities()); this.jobRepo = new JobRepository(new MVCEntities()); this.accountRepo = new AccountRepository(new MVCEntities()); this.notiRepo = new NotificationRepository(new MVCEntities()); }
public void AoAcessarACadaDeAcessoADadosParaConsultarSeDeterminadoEmailJaEstaCadastrado_DeveRetornarFalsoCasoNaoExitaOEmail() { var user = new User { Name = "Daniel Silva Moreira", Email = "*****@*****.**", Phone = "3133333333", CellPhone = "3188888888", Address = "Rua Teste", Number = 123, District = "Centro", City = "Belo Horizonte", ZipCode = 30246130, State = "MG", Password = "******", UserType = "user" }; const string email = "*****@*****.**"; var auxContext = new LivrariaTDDContext(); auxContext.Users.Add(user); auxContext.SaveChanges(); var mockContext = new LivrariaTDDContext(); _repository = new AccountRepository(mockContext); var result = _repository.CheckEmail(email); Assert.False(result); }
public BankModule(ICashDispenser dispenser, IAccountRepository accountRepo) { _dispenser = dispenser; _accountRepo = accountRepo; Get["/"] = _ => { return @"<html> <body> <form action='/withdraw' method='post'> <label for='accountNo'>Account no</label> <input type='text' name='accountNo' id='accountNo'> <br /> <label for='amount'>Amount</label> <input type='text' name='amount' id='amount'> <br /> <input type='submit' name='withdraw' id='withdraw' value='Withdraw'> </form> </body> </html>"; }; Post["/withdraw"] = p => { var vm = this.Bind<WithdrawalVM>(); var account = _accountRepo.GetAccount(vm.AccountNo); var teller = new Teller(_dispenser); teller.AuthenticateAs(account); teller.Withdraw(vm.Amount); return "It's done!"; }; }
public ReportLogic(IUnitOfWork unit, IReportRepository repo, IActivityRepository a, IAccountRepository ac) { this.Unit = unit; this.Repo = repo; this.actRepo = a; this.aRepo = ac; }
public TransactionApp(ITransactionRepository transactionRepository, IAccountRepository accountRepository, ICategoryRepository categoryRepository, IPropertyRepository propertyRepository) { _transactionRepository = transactionRepository; _accountRepository = accountRepository; _categoryRepository = categoryRepository; _propertyRepository = propertyRepository; }
public useradminController(IAccountRepository _rightRepository, IDataCenterRepository _datacenterRepository, IMaterialRepository _materialRepository, ICostanalysisRepository _costanalysisRepository) { accountService = new AccountService(_rightRepository); centerService = new DataCenterService(_datacenterRepository); materialService = new MaterialService(_materialRepository); costanalysisService = new CostanalysisService(_costanalysisRepository); }
public AccountService(ILoggingService loggingService, IAccountRepository accountRepository, ISharedHelper helper) { _loggingService = loggingService; _accountRepository = accountRepository; _helper = helper; }
public AccountController(IOAuthWebSecurityWrapper oAuthWebSecurityWrapper, IAccountRepository accountRepository, IFormsAuthenticationWrapper formsAuthenticationWrapper) { _oAuthWebSecurityWrapper = oAuthWebSecurityWrapper; _accountRepository = accountRepository; _formsAuthenticationWrapper = formsAuthenticationWrapper; }
public AccountController(IAccountRepository accountRepository) { _accountRepository = accountRepository; membership = new CustomMembership(); membership.AccountRepository = _accountRepository; }
public AccountBrowserViewModel(IAccountRepository accountRepository, IAccountTagRepository accountTagRepository, IMainWindowViewModel mainWindow = null) { _accountRepository = accountRepository; _accountTagRepository = accountTagRepository; _mainWindow = mainWindow; _accounts = new ObservableCollection<AccountViewModel>(); }
public void Init(IInviteFriends view) { _view = view; //_userSession = ObjectFactory.GetInstance<IUserSession>(); //_email = ObjectFactory.GetInstance<IEmail>(); //_friendInvitationRepository = ObjectFactory.GetInstance<IFriendInvitationRepository>(); //_accountRepository = ObjectFactory.GetInstance<IAccountRepository>(); //_webContext = ObjectFactory.GetInstance<IWebContext>(); _userSession = new SPKTCore.Core.Impl.UserSession(); _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository(); _email = new SPKTCore.Core.Impl.Email(); _webContext = new SPKTCore.Core.Impl.WebContext(); if (_userSession.LoggedIn) { _account = _userSession.CurrentUser; _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository(); if (_account != null) { _view.DisplayToData(_account.UserName + " <" + _account.Email + ">"); if (_webContext.AccoundIdToInvite > 0) { _accountToInvite = _accountRepository.GetAccountByID(_webContext.AccoundIdToInvite); if (_accountToInvite != null) { SendInvitation(_accountToInvite.Email, _account.UserName + " " + _account.UserName + " "); _view.ShowMessage(_accountToInvite.UserName + " Đã được gửi đi!"); _view.TogglePnlInvite(false); } } } } }
public FileWriter(IAccountRepository accountRepository, IAccountTagRepository accountTagRepository, ITemplateRepository templateRepository, IJournalRepository journalRepository) { _accountRepository = accountRepository; _accountTagRepository = accountTagRepository; _templateRepository = templateRepository; _journalRepository = journalRepository; }
protected void Page_Load(object sender, EventArgs e) { //_profileRepository = new ProfileRepository(); _fr = new FileRepository(); _userSession = new UserSession(); _accountRepository = new AccountRepository(); _webContext = new WebContext(); if (_userSession.LoggedIn && _userSession.CurrentUser != null) { account = _userSession.CurrentUser; file = _fr.GetFileByID(fileID); } //show the appropriate image if (file != null) { //Response.Clear(); Response.ContentType = "jpg"; Response.BinaryWrite(file.ContentFile.ToArray()); } }
public AccountManager( ISecurityProvider securityProvider, IAccountRepository accountRepository, IAccountValidator accountValidator, ITimeSource timeSource, int accountSessionCollectionCapacity, ISessionRepository sessionRepository, IActionRightResolver actionRightResolver/*, Func<TBizAccountRegistrationData, TBizAccount> accountRegistrationDataToAccount*/) { // todo1[ak] check args _securityProvider = securityProvider; _accountRepository = accountRepository; _accountValidator = accountValidator; _timeSource = timeSource; _sessionManager = new SessionManager( _securityProvider, _timeSource, accountSessionCollectionCapacity, sessionRepository); _actionRightResolver = actionRightResolver; //_accountRegistrationDataToAccount = accountRegistrationDataToAccount; }
public AccountController(IAccountService accountService) { repository = new AccountRepository(); if (accountService == null) throw new ArgumentNullException(); this.accountService = accountService; }
public PlatformManager() { managerTrade = ManagerTrade.Instance; userSettingsStorage = new UserSettingsStorage(); walletRepository = new WalletRepository(); accountRepository = AccountRepository.Instance; }
public FacebookAccountRepository(IAccountRepository accountRepository, IFacebookDataRepository facebookDataRepository, IEventBus eventBus) { this.accountRepository = accountRepository; this.facebookDataRepository = facebookDataRepository; this.eventBus = eventBus; }
public UserAccountRepository(IAccountRepository repository) { if (repository != null) _repository = repository; else throw new ArgumentNullException(); }
public AdminController(PostRepository repo, IRepository<Category> category, IRepository<Location> locationRepo, IAccountRepository account) { _postRepo = repo; _categoryRepo = category; _locationRepo = locationRepo; _accountRepo = account; }
public AuthorizationService(IAccountRepository accountRepository, ISessionRepository sessionRepository, IPasswordHashManager passwordHashManager) { _accountRepository = accountRepository; _sessionRepository = sessionRepository; _passwordHashManager = passwordHashManager; }
public Handler(IUserContext userContext, IAccountRepository repository, ILogger <Handler> logger) { _userContext = userContext; _repository = repository; _logger = logger; }
public AccountService(IAccountRepository accountRepository) { _accountRepository = accountRepository; }
public AccountCommandHandlers(IAccountRepository repository) { _repository = repository; }
public AccountManager(IAccountRepository accountRepository) { _accountRepository = accountRepository; }
public CharacterCheckNick(IAccountRepository accountRepository) { _accountRepository = accountRepository; }
/// <summary> /// Account Controller ctor /// </summary> /// <param name="accountRepository"></param> public AccountController(IAccountRepository accountRepository) { this.AccountRepository = accountRepository; }
public WithdrawMoney(IAccountRepository accountRepository, INotificationService notificationService) { this.accountRepository = accountRepository; this.notificationService = notificationService; }
public AccountTransactionHandler(IAccountRepository repo) { _repo = repo; }
public AccountService(IAccountRepository accountRepository, IUnitOfWork unitOfWork) { this._accountRepository = accountRepository; this._unitOfWork = unitOfWork; }
public AccountController(ILogger <AccountController> logger, IAccountRepository repository) { _logger = logger; _repository = repository; }
public ChatDetailHub(IMapper mapper, IRoomRepository iRoomRepository, IMessageRepository iMessageRepository, IAccountRepository iAccountRepository, IThongBaoRepository thongBaoRepository, ICustomerRepository customerRepository) { _mapper = mapper; _iRoomRepository = iRoomRepository; _iMessageRepository = iMessageRepository; _iAccountRepository = iAccountRepository; this.thongBaoRepository = thongBaoRepository; this.customerRepository = customerRepository; }
public AdminNavController(IMenuRepository menuRepo, IAccountRepository accountRepo) { menuRepository = menuRepo; accountRepository = accountRepo; }
public GetAccountByIdHandler(IAccountRepository repo) { _repo = repo; }
public ResetPasswordCommandHandler(IAccountRepository accountRepository, IApiMessagesResource apiMessagesResource) { _accountRepository = accountRepository; _apiMessagesResource = apiMessagesResource; }
public AccountService(IAccountRepository _accountRepository, IEventBus bus) { accountRepository = _accountRepository; _bus = bus; }
public UserFactoryRepository(IAccountRepository accountRepository, IProfileRepository profileRepository, ISettingsRepository settingsRepository) { Accounts = accountRepository; Profiles = profileRepository; Settings = settingsRepository; }
public FreezeAccountCommandHandler(IAccountStatusValidator statusValidator, IAccountRepository accountRepository) { _statusValidator = statusValidator ?? throw new ArgumentNullException(nameof(statusValidator)); _accountRepository = accountRepository ?? throw new ArgumentNullException(nameof(accountRepository)); }
public AttachEmailCommandHandler(IAccountRepository repository) =>
public SalesOrderHeaderController(IAccountRepository accountRepository, ISalesOrderHeaderRepository salesOrderHeaderRepository, ILogger <SalesOrderHeaderRepository> logger) { _accountRepository = accountRepository; _salesOrderHeaderRepository = salesOrderHeaderRepository; _logger = logger; }
public CreateAccountUseCase(IAccountRepository accountRepository) { _accountRepository = accountRepository; }
public TrasnferCommandHandler(IAccountRepository accountRepo, AppDbContext unitOfWork) { _accountRepo = accountRepo; _unitOfWork = unitOfWork; }
public AccountsAppService(IAccountRepository accountRepository, IMapper mapper) { _accountRepository = accountRepository; _mapper = mapper; }
public MoneyBase(IAccountRepository accountRepository) { this.accountRepository = accountRepository; }
public CustomerRepository(IAccountRepository accountRepository, ICustomerAccountRepository customerAccountRepository, AppDbContext appDbContext) { _accountRepository = accountRepository; _customerAccountRepository = customerAccountRepository; _appDbContext = appDbContext; }
public AccountController(IAccountRepository r) { repo = r; }
public AccountService(IAccountRepository accountRepository, IEventBus eventBus) { _accountRepository = accountRepository; _eventBus = eventBus; }
public SendNotificationWhenItemHadBeenUpdated(ITodoListRepository todoList, IHubContext <NotificationHub> context, IAccountRepository account, IHttpContextAccessor httpContextAccessor) { _httpContextAccessor = httpContextAccessor; _todoList = todoList; _context = context; _account = account; }
public AccountAuthority(IAccountRepository repository) { _repository = repository; }
public RequestPasswordResetHandler(IAccountRepository accountRepository, ICommandBus commandBus) { _accountRepository = accountRepository; _commandBus = commandBus; }
public TransferMoney(IAccountRepository accountRepository, INotificationService notificationService) { this._accountRepository = accountRepository; this._notificationService = notificationService; }