public CreateOrderService(ICommandBus commandBus, IAccountDao accountDao, IServerSettings serverSettings, ReferenceDataService referenceDataService, IIBSServiceProvider ibsServiceProvider, IRuleCalculator ruleCalculator, IAccountChargeDao accountChargeDao, ICreditCardDao creditCardDao, IOrderDao orderDao, IPromotionDao promotionDao, IEventSourcedRepository <Promotion> promoRepository, ITaxiHailNetworkServiceClient taxiHailNetworkServiceClient, IPaymentService paymentService, IPayPalServiceFactory payPalServiceFactory, IOrderPaymentDao orderPaymentDao, IFeesDao feesDao, ILogger logger, IIbsCreateOrderService ibsCreateOrderService) : base(serverSettings, commandBus, accountChargeDao, paymentService, creditCardDao, ibsServiceProvider, promotionDao, promoRepository, orderPaymentDao, accountDao, payPalServiceFactory, logger, taxiHailNetworkServiceClient, ruleCalculator, feesDao, referenceDataService, orderDao) { _commandBus = commandBus; _accountDao = accountDao; _referenceDataService = referenceDataService; _serverSettings = serverSettings; _orderDao = orderDao; _taxiHailNetworkServiceClient = taxiHailNetworkServiceClient; _logger = logger; _ibsCreateOrderService = ibsCreateOrderService; _resources = new Resources.Resources(_serverSettings); _taxiHailNetworkHelper = new TaxiHailNetworkHelper(_serverSettings, _taxiHailNetworkServiceClient, _commandBus, _logger); }
public void CommonUsageMultithread() { container = CreateConfiguredContainer(); container.AddFacility("IBatisNet", new IBatisNetFacility()); container.AddComponent("AccountDao", typeof(IAccountDao), typeof(AccountDao)); ResetDatabase(); _dao = container["AccountDao"] as AccountDao; const int threadCount = 10; Thread[] threads = new Thread[threadCount]; for (int i = 0; i < threadCount; i++) { threads[i] = new Thread(new ThreadStart(ExecuteMethodUntilSignal)); threads[i].Start(); } _startEvent.Set(); Thread.CurrentThread.Join(1 * 2000); _stopEvent.Set(); }
public AddressHistoryService(IAddressDao dao, ICommandBus commandBus, IAccountDao accountDao, IOrderDao orderDao) { _dao = dao; _commandBus = commandBus; _accountDao = accountDao; _orderDao = orderDao; }
public NoteParamConverter(IAccountDao accountDao, ICategoryDao categoryDao, INoteStatusDao statusDao, INoteTypeDao typeDao) { _accountDao = accountDao; _categoryDao = categoryDao; _statusDao = statusDao; _typeDao = typeDao; }
public void CommonUsageMultithread() { container = CreateConfiguredContainer(); container.AddFacility("IBatisNet", new IBatisNetFacility()); container.AddComponent("AccountDao", typeof (IAccountDao), typeof (AccountDao)); ResetDatabase(); _dao = container["AccountDao"] as AccountDao; const int threadCount = 10; Thread[] threads = new Thread[threadCount]; for (int i = 0; i < threadCount; i++) { threads[i] = new Thread(new ThreadStart(ExecuteMethodUntilSignal)); threads[i].Start(); } _startEvent.Set(); Thread.CurrentThread.Join(1*2000); _stopEvent.Set(); }
public CustomCredentialsAuthProvider(ICommandBus commandBus, IAccountDao dao, IPasswordService passwordService, IServerSettings serverSettings) { _passwordService = passwordService; _commandBus = commandBus; _serverSettings = serverSettings; Dao = dao; }
public AccountBalances(IApplicationState applicationState, ICacheService cacheService, IAccountDao accountDao) { _applicationState = applicationState; _cacheService = cacheService; _accountDao = accountDao; Balances = new Dictionary<int, decimal>(); }
public void TestCreateAccount() { IAccountDao accountDao = (IAccountDao)daoManager[typeof(IAccountDao)]; Account account = NewAccount(); try { daoManager.OpenConnection(); accountDao.Create(account); account = accountDao.GetAccountById(1001); } catch (Exception e) { // Ignore Console.WriteLine("TestCreateAccount, error cause : " + e.Message); } finally { daoManager.CloseConnection(); } Assert.IsNotNull(account); Assert.AreEqual("*****@*****.**", account.EmailAddress); }
/// <summary> /// 呼叫方法時傳入建構參數 /// </summary> /// <param name="accountDao"></param> /// <param name="hash"></param> /// <param name="id"></param> /// <param name="password"></param> /// <returns></returns> public bool CheckAuthentication(IAccountDao accountDao, IHash hash, string id, string password) { var passwordByDao = accountDao.GetPassword(id); var hashResult = hash.GetHashResult(password); return(passwordByDao == hashResult); }
public AccountBalances(IApplicationState applicationState, ICacheService cacheService, IAccountDao accountDao) { _applicationState = applicationState; _cacheService = cacheService; _accountDao = accountDao; Balances = new Dictionary <int, decimal>(); }
public SendReceiptService( ICommandBus commandBus, IIBSServiceProvider ibsServiceProvider, IOrderDao orderDao, IOrderPaymentDao orderPaymentDao, ICreditCardDao creditCardDao, IAccountDao accountDao, IPromotionDao promotionDao, IReportDao reportDao, IServerSettings serverSettings, IGeocoding geocoding, ILogger logger) { _serverSettings = serverSettings; _logger = logger; _ibsServiceProvider = ibsServiceProvider; _orderDao = orderDao; _orderPaymentDao = orderPaymentDao; _accountDao = accountDao; _promotionDao = promotionDao; _reportDao = reportDao; _creditCardDao = creditCardDao; _geocoding = geocoding; _commandBus = commandBus; }
public PushNotificationSender(INotificationService notificationService, IServerSettings serverSettings, IPromotionDao promotionDao, IAccountDao accountDao) { _notificationService = notificationService; _serverSettings = serverSettings; _promotionDao = promotionDao; _accountDao = accountDao; }
public FunctionRegistry(IAccountDao accountDao, IDepartmentService departmentService, ISettingService settingService, ICacheService cacheService) { _accountDao = accountDao; _departmentService = departmentService; _settingService = settingService; _cacheService = cacheService; }
public void TestTransactionCommit() { IAccountDao accountDao = (IAccountDao)daoManager[typeof(IAccountDao)]; Account account = NewAccount(); daoManager.OpenConnection(); Account account2 = accountDao.GetAccountById(1); daoManager.CloseConnection(); account2.EmailAddress = "*****@*****.**"; try { daoManager.BeginTransaction(); accountDao.Create(account); accountDao.Update(account2); daoManager.CommitTransaction(); } finally { // Nothing } daoManager.OpenConnection(); account = accountDao.GetAccountById(account.Id); account2 = accountDao.GetAccountById(1); daoManager.CloseConnection(); Assert.IsNotNull(account); Assert.AreEqual("*****@*****.**", account2.EmailAddress); }
//public string ManageResource = "https://management.chinacloudapi.cn"; //public string LogAnalyResource = "https://api.loganalytics.azure.cn"; public AKSBus(IAKSDto aKSDto, ITokenDto tokenDto, IAccountDao accountDao, IOptions <TokenResourceModel> tokenResource) { this._aKSDto = aKSDto; this._tokenDto = tokenDto; _accountDao = accountDao; _tokenResource = tokenResource; }
public AccountManagementController(ICacheClient cache, IServerSettings serverSettings, IAccountDao accountDao, IAccountNoteService accountNoteService, ICreditCardDao creditCardDao, ICommandBus commandBus, IOrderDao orderDao, IPromotionDao promoDao, IPaymentService paymentService, INotificationService notificationService, BookingSettingsService bookingSettingsService, ConfirmAccountService confirmAccountService, ExportDataService exportDataService) : base(cache, serverSettings) { _accountDao = accountDao; _accountNoteService = accountNoteService; _creditCardDao = creditCardDao; _bookingSettingsService = bookingSettingsService; _commandBus = commandBus; _serverSettings = serverSettings; _orderDao = orderDao; _promoDao = promoDao; _confirmAccountService = confirmAccountService; _exportDataService = exportDataService; _paymentService = paymentService; _notificationService = notificationService; _resources = new Resources(serverSettings); }
public NoteProcessor(INoteParamConverter paramConverter, INoteResultConverter resultConverter, INoteDao dao, IHttpContextAccessor httpContextAccessor, IAccountDao accountDao) : base(paramConverter, resultConverter, dao) { _accountDao = accountDao; _httpContextAccessor = httpContextAccessor; }
//public string LogAnalyResource = "https://api.loganalytics.azure.cn"; // apilog="https://api.loganalytics.azure.cn" // portallog="https://portal.loganalytics.azure.cn" public MonitorBus(IMonitorDto monitorDto, ITokenDto tokenDto, IAccountDao accountDao, IOptions <TokenResourceModel> tokenResource) { _monitorDto = monitorDto; _tokenDto = tokenDto; _accountDao = accountDao; _tokenResource = tokenResource; }
public SalaryInfoService(IAccountDao accountDao, ISalaryDao salaryDao, IPaySlipCalculator paySlipCalculator, IPaySlipDao paySlipDao) { this.accountDao = accountDao; this.salaryDao = salaryDao; this.paySlipCalculator = paySlipCalculator; this.paySlipDao = paySlipDao; }
public PushNotificationRegistrationService(IAccountDao accountDao, IDeviceDao deviceDao, ICommandBus commandBus) { _accountDao = accountDao; _deviceDao = deviceDao; _commandBus = commandBus; }
public ExportDataService(IAccountDao accountDao, IReportDao reportDao, IServerSettings serverSettings, IAppStartUpLogDao appStartUpLogDao, IPromotionDao promotionsDao) { _accountDao = accountDao; _reportDao = reportDao; _serverSettings = serverSettings; _appStartUpLogDao = appStartUpLogDao; _promotionsDao = promotionsDao; }
public RegisterAccountService(ICommandBus commandBus, IAccountDao accountDao, IServerSettings serverSettings, IBlackListEntryService blackListEntryService) { _commandBus = commandBus; _accountDao = accountDao; _serverSettings = serverSettings; _blackListEntryService = blackListEntryService; _resources = new Resources.Resources(serverSettings); }
public void TestUsingTransactionScope() { Account account = NewAccount(); IAccountDao accountDao = daoManager[typeof(IAccountDao)] as IAccountDao; IUserDao userDao = daoManager2[typeof(IUserDao)] as IUserDao; DateTime stamp = DateTime.Now.AddDays(2); User joeCool = null; daoManager.OpenConnection(); accountDao.Create(account); daoManager.CloseConnection(); User newUser = new User(); newUser.Id = "joe_cool"; newUser.UserName = "******"; newUser.Password = "******"; newUser.EmailAddress = "*****@*****.**"; newUser.LastLogon = DateTime.Now; daoManager2.OpenConnection(); userDao.Create(newUser); daoManager2.CloseConnection(); using (TransactionScope tx = new TransactionScope()) { daoManager.OpenConnection(); account = accountDao.GetAccountById(1001); account.FirstName = "TestTransactionScope"; accountDao.Update(account); daoManager.CloseConnection(); daoManager2.OpenConnection(); joeCool = userDao.Load("joe_cool"); joeCool.LastLogon = stamp; daoManager2.CloseConnection(); //tx.Complete(); // not call complte --> RollBack } //---------------------------------------- daoManager.OpenConnection(); account = accountDao.GetAccountById(1001); daoManager.CloseConnection(); Assert.IsNotNull(account); Assert.AreEqual("*****@*****.**", account.EmailAddress); Assert.IsFalse("TestTransactionScope" == account.FirstName); //---------------- daoManager2.OpenConnection(); joeCool = userDao.Load("joe_cool"); daoManager2.CloseConnection(); Assert.IsNotNull(joeCool); Assert.AreEqual("Joseph Cool", joeCool.UserName); Assert.IsFalse(stamp.ToString() == joeCool.LastLogon.ToString()); }
public void TestGetDao() { Type type = typeof(IAccountDao); IAccountDao accountDao = (IAccountDao)daoManager[typeof(IAccountDao)]; Assert.IsNotNull(accountDao); Assert.IsTrue(type.IsInstanceOfType(accountDao)); }
public CmtPaymentPairingService(IOrderDao orderDao, IAccountDao accountDao, ICreditCardDao creditCardDao, ILogger logger, ICommandBus commandBus, IServerSettings serverSettings) { _orderDao = orderDao; _accountDao = accountDao; _creditCardDao = creditCardDao; _logger = logger; _commandBus = commandBus; _serverSettings = serverSettings; }
public OrderService(IOrderDao dao, IOrderPaymentDao orderPaymentDao, IPromotionDao promotionDao, IAccountDao accountDao, ICommandBus commandBus, IIBSServiceProvider ibsServiceProvider) { _orderPaymentDao = orderPaymentDao; _promotionDao = promotionDao; _accountDao = accountDao; _commandBus = commandBus; _ibsServiceProvider = ibsServiceProvider; Dao = dao; }
public BookingSettingsService(IAccountChargeDao accountChargeDao, IAccountDao accountDao, ICommandBus commandBus, IIBSServiceProvider ibsServiceProvider, IServerSettings serverSettings) { _accountChargeDao = accountChargeDao; _accountDao = accountDao; _commandBus = commandBus; _ibsServiceProvider = ibsServiceProvider; _serverSettings = serverSettings; _resources = new Resources.Resources(serverSettings); }
public ConfirmAccountService(ICommandBus commandBus, IAccountDao accountDao, ITemplateService templateService, IBlackListEntryService blackListEntryService, IServerSettings serverSettings) { _accountDao = accountDao; _templateService = templateService; _serverSettings = serverSettings; _commandBus = commandBus; _blackListEntryService = blackListEntryService; _resources = new Resources.Resources(serverSettings); }
public void TestUsingConnection() { IAccountDao accountDao = (IAccountDao)daoManager[typeof(IAccountDao)]; using (IDalSession session = daoManager.OpenConnection()) { Account account = NewAccount(); accountDao.Create(account); } // compiler will call Dispose on DaoSession }
public AccountService( IValidationService validationService, IAccountDao accountDao, IEncryptionService encryptionService, IValidationMessageProvider validationMessageProvider) { this.validationService = validationService; this.accountDao = accountDao; this.encryptionService = encryptionService; this.validationMessageProvider = validationMessageProvider; }
public PromoCodeController(ICacheClient cache, IServerSettings serverSettings, IPromotionDao promotionDao, IAccountDao accountDao, ICommandBus commandBus) : base(cache, serverSettings) { _promotionDao = promotionDao; _accountDao = accountDao; _commandBus = commandBus; _serverSettings = serverSettings; }
public PromotionTriggerGenerator(Func <BookingDbContext> contextFactory, ICommandBus commandBus, IPromotionDao promotionDao, IAccountDao accountDao, IOrderDao orderDao) { _contextFactory = contextFactory; _commandBus = commandBus; _promotionDao = promotionDao; _accountDao = accountDao; _orderDao = orderDao; }
public AccountService(ICacheService cacheService, IAccountDao accountDao) { _cacheService = cacheService; _accountDao = accountDao; }
public Service(IAccountDao accountDao) { _accountDao = accountDao; }
public Authentication(IAccountDao dao) { this.dao = dao; }
public AccountRowBuilder(IAccountDao accountDao, ICacheService cacheService) { _accountDao = accountDao; _cacheService = cacheService; }
public AccountService(ICacheService cacheService, IAccountDao accountDao, AccountRowBuilder accountRowBuilder) { _cacheService = cacheService; _accountDao = accountDao; _accountRowBuilder = accountRowBuilder; }