protected PayoutHandlerBase(IConnectionFactory cf, IMapper mapper, IShareRepository shareRepo, IBlockRepository blockRepo, IBalanceRepository balanceRepo, IPaymentRepository paymentRepo, IEnumerable <Meta <INotificationSender, NotificationSenderMetadataAttribute> > notificationSenders) { Contract.RequiresNonNull(cf, nameof(cf)); Contract.RequiresNonNull(mapper, nameof(mapper)); Contract.RequiresNonNull(shareRepo, nameof(shareRepo)); Contract.RequiresNonNull(blockRepo, nameof(blockRepo)); Contract.RequiresNonNull(balanceRepo, nameof(balanceRepo)); Contract.RequiresNonNull(paymentRepo, nameof(paymentRepo)); Contract.RequiresNonNull(notificationSenders, nameof(notificationSenders)); this.cf = cf; this.mapper = mapper; this.shareRepo = shareRepo; this.blockRepo = blockRepo; this.balanceRepo = balanceRepo; this.paymentRepo = paymentRepo; this.notificationSenders = notificationSenders; BuildFaultHandlingPolicy(); }
public ShareService(IShareRepository shareRepository, ITurbineRepository turbineRepository, IFarmRepository farmRepository, IShareHolderRepository shareHolderRepository) { _shareRepository = shareRepository; _turbineRepository = turbineRepository; _farmRepository = farmRepository; _shareHolderRepository = shareHolderRepository; }
public PayoutManager(IComponentContext ctx, IConnectionFactory cf, IBlockRepository blockRepo, IShareRepository shareRepo, IBalanceRepository balanceRepo, ClusterConfig clusterConfig, IMessageBus messageBus) { Contract.RequiresNonNull(ctx, nameof(ctx)); Contract.RequiresNonNull(cf, nameof(cf)); Contract.RequiresNonNull(blockRepo, nameof(blockRepo)); Contract.RequiresNonNull(shareRepo, nameof(shareRepo)); Contract.RequiresNonNull(balanceRepo, nameof(balanceRepo)); Contract.RequiresNonNull(messageBus, nameof(messageBus)); this.ctx = ctx; this.cf = cf; this.blockRepo = blockRepo; this.shareRepo = shareRepo; this.balanceRepo = balanceRepo; this.messageBus = messageBus; this.clusterConfig = clusterConfig; interval = TimeSpan.FromSeconds(clusterConfig.PaymentProcessing.Interval > 0 ? clusterConfig.PaymentProcessing.Interval : 600); }
public ShareRecorder(IConnectionFactory cf, IMapper mapper, JsonSerializerSettings jsonSerializerSettings, IShareRepository shareRepo, IBlockRepository blockRepo, ClusterConfig clusterConfig, IMessageBus messageBus) { Contract.RequiresNonNull(cf, nameof(cf)); Contract.RequiresNonNull(mapper, nameof(mapper)); Contract.RequiresNonNull(shareRepo, nameof(shareRepo)); Contract.RequiresNonNull(blockRepo, nameof(blockRepo)); Contract.RequiresNonNull(jsonSerializerSettings, nameof(jsonSerializerSettings)); Contract.RequiresNonNull(messageBus, nameof(messageBus)); this.cf = cf; this.mapper = mapper; this.jsonSerializerSettings = jsonSerializerSettings; this.messageBus = messageBus; this.clusterConfig = clusterConfig; this.shareRepo = shareRepo; this.blockRepo = blockRepo; pools = clusterConfig.Pools.ToDictionary(x => x.Id, x => x); BuildFaultHandlingPolicy(); ConfigureRecovery(); }
// // GET: /Wall/ //[HttpGet] public ActionResult Index(string userId) { // get current user Session.Remove("preStatusId"); string curUserId; if (string.IsNullOrEmpty(userId)) { curUserId = User.Identity.GetUserId(); } else { curUserId = userId; } this._shareRepository = new ShareRepository(this._dbContext); var listStatusIdShared = this._shareRepository.GetStatusIdShared(curUserId); this._statusRepository = new StatusRepository(this._dbContext); var listStatusViewModel = this._statusRepository.GetListStatusByRangeStatusId(listStatusIdShared); this._userRepository = new UserRepository(_dbContext); var curUser = this._userRepository.GetUserById(curUserId); ViewBag.curUser = curUser; return(View(listStatusViewModel)); }
public ShareRecorder(IConnectionFactory cf, IMapper mapper, JsonSerializerSettings jsonSerializerSettings, IShareRepository shareRepo, IBlockRepository blockRepo, IMasterClock clock, IMessageBus messageBus, NotificationService notificationService) { Contract.RequiresNonNull(cf, nameof(cf)); Contract.RequiresNonNull(mapper, nameof(mapper)); Contract.RequiresNonNull(shareRepo, nameof(shareRepo)); Contract.RequiresNonNull(blockRepo, nameof(blockRepo)); Contract.RequiresNonNull(jsonSerializerSettings, nameof(jsonSerializerSettings)); Contract.RequiresNonNull(clock, nameof(clock)); Contract.RequiresNonNull(messageBus, nameof(messageBus)); Contract.RequiresNonNull(notificationService, nameof(notificationService)); this.cf = cf; this.mapper = mapper; this.jsonSerializerSettings = jsonSerializerSettings; this.clock = clock; this.messageBus = messageBus; this.notificationService = notificationService; this.shareRepo = shareRepo; this.blockRepo = blockRepo; BuildFaultHandlingPolicy(); }
public StatsRecorder(IComponentContext ctx, IMasterClock clock, IConnectionFactory cf, IMessageBus messageBus, IMapper mapper, ClusterConfig clusterConfig, IShareRepository shareRepo, IStatsRepository statsRepo) { Contract.RequiresNonNull(ctx, nameof(ctx)); Contract.RequiresNonNull(clock, nameof(clock)); Contract.RequiresNonNull(cf, nameof(cf)); Contract.RequiresNonNull(messageBus, nameof(messageBus)); Contract.RequiresNonNull(mapper, nameof(mapper)); Contract.RequiresNonNull(shareRepo, nameof(shareRepo)); Contract.RequiresNonNull(statsRepo, nameof(statsRepo)); this.clock = clock; this.cf = cf; this.mapper = mapper; this.messageBus = messageBus; this.shareRepo = shareRepo; this.statsRepo = statsRepo; this.clusterConfig = clusterConfig; updateInterval = TimeSpan.FromSeconds(clusterConfig.Statistics?.UpdateInterval ?? 120); gcInterval = TimeSpan.FromHours(clusterConfig.Statistics?.GcInterval ?? 4); hashrateCalculationWindow = TimeSpan.FromMinutes(clusterConfig.Statistics?.HashrateCalculationWindow ?? 10); cleanupDays = TimeSpan.FromDays(clusterConfig.Statistics?.CleanupDays ?? 180); BuildFaultHandlingPolicy(); }
public CartController(IProductRepository repo, Cart cartService, IShareRepository shareRepo, IOrderRepository orderRepo) { _repository = repo; _shareRepository = shareRepo; _cart = cartService; _orderRepository = orderRepo; }
protected PayoutHandlerBase(IConnectionFactory cf, IMapper mapper, IShareRepository shareRepo, IBlockRepository blockRepo, IBalanceRepository balanceRepo, IPaymentRepository paymentRepo, IMasterClock clock, NotificationService notificationService) { Contract.RequiresNonNull(cf, nameof(cf)); Contract.RequiresNonNull(mapper, nameof(mapper)); Contract.RequiresNonNull(shareRepo, nameof(shareRepo)); Contract.RequiresNonNull(blockRepo, nameof(blockRepo)); Contract.RequiresNonNull(balanceRepo, nameof(balanceRepo)); Contract.RequiresNonNull(paymentRepo, nameof(paymentRepo)); Contract.RequiresNonNull(clock, nameof(clock)); Contract.RequiresNonNull(notificationService, nameof(notificationService)); this.cf = cf; this.mapper = mapper; this.clock = clock; this.shareRepo = shareRepo; this.blockRepo = blockRepo; this.balanceRepo = balanceRepo; this.paymentRepo = paymentRepo; this.notificationService = notificationService; BuildFaultHandlingPolicy(); }
public InsertActivityInteractor( IShareRepository shareRepository, ActivityInteractor activityInteractor) { this.shareRepository = shareRepository; this.activityInteractor = activityInteractor; }
public StatsRecorder(IComponentContext ctx, IMasterClock clock, IConnectionFactory cf, IMessageBus messageBus, IMapper mapper, IShareRepository shareRepo, IStatsRepository statsRepo) { Contract.RequiresNonNull(ctx, nameof(ctx)); Contract.RequiresNonNull(clock, nameof(clock)); Contract.RequiresNonNull(cf, nameof(cf)); Contract.RequiresNonNull(messageBus, nameof(messageBus)); Contract.RequiresNonNull(mapper, nameof(mapper)); Contract.RequiresNonNull(shareRepo, nameof(shareRepo)); Contract.RequiresNonNull(statsRepo, nameof(statsRepo)); this.ctx = ctx; this.clock = clock; this.cf = cf; this.mapper = mapper; this.messageBus = messageBus; this.shareRepo = shareRepo; this.statsRepo = statsRepo; BuildFaultHandlingPolicy(); }
// // GET: /Wall/ //[HttpGet] public ActionResult Index(string userId) { // get current user Session.Remove("preStatusId"); string curUserId; if(string.IsNullOrEmpty(userId)) { curUserId = User.Identity.GetUserId(); } else { curUserId = userId; } this._shareRepository = new ShareRepository(this._dbContext); var listStatusIdShared = this._shareRepository.GetStatusIdShared(curUserId); this._statusRepository = new StatusRepository(this._dbContext); var listStatusViewModel = this._statusRepository.GetListStatusByRangeStatusId(listStatusIdShared); this._userRepository = new UserRepository(_dbContext); var curUser = this._userRepository.GetUserById(curUserId); ViewBag.curUser = curUser; return View(listStatusViewModel); }
protected PayoutHandlerBase( IConnectionFactory cf, IMapper mapper, IShareRepository shareRepo, IBlockRepository blockRepo, IBalanceRepository balanceRepo, IPaymentRepository paymentRepo, IMasterClock clock, IMessageBus messageBus) { Contract.RequiresNonNull(cf); Contract.RequiresNonNull(mapper); Contract.RequiresNonNull(shareRepo); Contract.RequiresNonNull(blockRepo); Contract.RequiresNonNull(balanceRepo); Contract.RequiresNonNull(paymentRepo); Contract.RequiresNonNull(clock); Contract.RequiresNonNull(messageBus); this.cf = cf; this.mapper = mapper; this.clock = clock; this.shareRepo = shareRepo; this.blockRepo = blockRepo; this.balanceRepo = balanceRepo; this.paymentRepo = paymentRepo; this.messageBus = messageBus; BuildFaultHandlingPolicy(); }
public TradeController(IShareRepository shareRepository, ITradeRepository tradeRepository, IPortfolioRepository portfolioRepository, ITradeHandlerFactry tradeHandlerFactory) { _shareRepository = shareRepository; _tradeRepository = tradeRepository; _portfolioRepository = portfolioRepository; _tradeHandlerFactory = tradeHandlerFactory; }
public void Initialize() { this.provider = Substitute.For <IPhraseProvider>(); this.shareRep = Substitute.For <IShareRepository>(); this.traderRep = Substitute.For <ITraderRepository>(); this.logger = Substitute.For <ILoggerService>(); }
public ProjectAppService(ISearchRepository searchRepository, IClientIdSettingsRepository settingsRepository, ILocalDatabaseRepository databaseRepository, IBrowserRepository browserRepository, IShareRepository shareRepository) { _searchRepository = searchRepository; _settingsRepository = settingsRepository; _databaseRepository = databaseRepository; _browserRepository = browserRepository; _shareRepository = shareRepository; }
public OrderController(IOrderRepository repoService, Cart cartService, IHostingEnvironment appEnvironment, IProductRepository repoProduct, IShareRepository repoShare) { _repositoryProduct = repoProduct; _repository = repoService; _cart = cartService; _appEnvironment = appEnvironment; _repositoryShares = repoShare; }
public SignShareFileCommandHandler(IShareRepository shareRepository, IUserRepository userRepository, IFileRepository fileRepository, IAesEncryptor encryptor, IEcdsa ecdsa) { _shareRepository = shareRepository; _userRepository = userRepository; _fileRepository = fileRepository; _encryptor = encryptor; _ecdsa = ecdsa; }
public GetSharedDocumentsInteractor( IShareRepository shareRepository, IDocumentRepository documentRepository, IUserRepository userRepository) { this.shareRepository = shareRepository; this.documentRepository = documentRepository; this.userRepository = userRepository; }
public SOLOPaymentScheme( IShareRepository shareRepo, IBalanceRepository balanceRepo) { Contract.RequiresNonNull(shareRepo); Contract.RequiresNonNull(balanceRepo); this.shareRepo = shareRepo; this.balanceRepo = balanceRepo; }
public NetWorthViewComponent(IAccountRepository saveRepo, IShareRepository shareRepo, IPaymentMethodRepository payRepo, IStockRepository stockRepo, ICryptoCurrencyRepository cryptoRepo, ICoinRepository coinRepo) { _saveRepo = saveRepo; _sharesRepo = shareRepo; _payRepo = payRepo; _stockRepo = stockRepo; _cryptoRepo = cryptoRepo; _coinRepo = coinRepo; }
public TraderService( IPhraseProvider provider, ITraderRepository traderRep, IShareRepository shareRep, ILoggerService logger) { this.provider = provider; this.traderRep = traderRep; this.shareRep = shareRep; this.logger = logger; }
public GetSharedActivitiesInteractor( IShareRepository shareRepository, IActivityRepository activityRepository, IDocumentRepository documentRepository, IUserRepository userRepository) { this.shareRepository = shareRepository; this.activityRepository = activityRepository; this.documentRepository = documentRepository; this.userRepository = userRepository; }
public TransactionService( ITraderRepository traderRep, IShareRepository shareRep, ITransactionRepository transactionRep, ILoggerService logger) { this.traderRep = traderRep; this.shareRep = shareRep; this.logger = logger; this.transactionRep = transactionRep; }
public ControllerTestBase() { var options = new DbContextOptionsBuilder <ExchangeContext>() .UseInMemoryDatabase(databaseName: "TestDB") .Options; _exchangeContext = new ExchangeContext(options); _shareRepository = new ShareRepository(_exchangeContext); _tradeRepository = new TradeRepository(_exchangeContext); _portfolioRepository = new PortfolioRepository(_exchangeContext); }
public void SetUp() { var config = new ConfigurationBuilder().AddJsonFile("appsettings.json").Build(); var connectionString = config["ConnectionStrings:DefaultConnection"]; var exchangeContext = new DbContextOptionsBuilder <ExchangeContext>(); exchangeContext.UseSqlServer(connectionString); PortfolioRepository = new PortfolioRepository(new ExchangeContext(exchangeContext.Options)); TradeRepository = new Mock <ITradeRepository>(); ShareRepository = new ShareRepository(new ExchangeContext(exchangeContext.Options)); }
public Controller( IInputOutput io, IPhraseProvider phraseProvider, GameSettings gs, ITraderService traderService, IShareService shareService, ITransactionService transactionService, ITraderRepository traderRep, IShareRepository shareRep, ITransactionRepository transactionRep) { this.io = io; this.phraseProvider = phraseProvider; this.traderService = traderService; this.shareService = shareService; this.transactionService = transactionService; this.traderRep = traderRep; this.shareRep = shareRep; this.transactionRep = transactionRep; Point start = (0, 0); int whidth = gs.whidthWindow; int height = gs.heightWindow; if (whidth < 160) { io.Print("Window whidth is low" + Environment.NewLine); throw new Exception(); } if (height < 30) { io.Print("Window height is low" + Environment.NewLine); throw new Exception(); } this.io.SetWindowSize(whidth + 4, height); terminal = new Terminal( (whidth / 2 + 1, start.y), whidth / 2, 5, io, phraseProvider); menu = new Menu( start, whidth / 2, height, io, phraseProvider); }
public ZCashPayoutHandler( IComponentContext ctx, IConnectionFactory cf, IMapper mapper, IShareRepository shareRepo, IBlockRepository blockRepo, IBalanceRepository balanceRepo, IPaymentRepository paymentRepo, IMasterClock clock, NotificationService notificationService) : base(ctx, cf, mapper, shareRepo, blockRepo, balanceRepo, paymentRepo, clock, notificationService) { }
public EquihashPayoutHandler( IComponentContext ctx, IConnectionFactory cf, IMapper mapper, IShareRepository shareRepo, IBlockRepository blockRepo, IBalanceRepository balanceRepo, IPaymentRepository paymentRepo, IMasterClock clock, IMessageBus messageBus) : base(ctx, cf, mapper, shareRepo, blockRepo, balanceRepo, paymentRepo, clock, messageBus) { }
public StockController(IShareRepository repo, IStockRepository stockRepo, ITargetAmountRepository goalRepo, ITargetTypeRepository goalTypeRepo, ISectorRepository sectorRepo, IAccountRepository saveRepo, IAccountTypeRepository saveTypeRepo, IIncomeEntryRespository incomeRepo) { _repo = repo; _stockRepo = stockRepo; _goalRepo = goalRepo; _goalTypeRepo = goalTypeRepo; _sectorRepo = sectorRepo; _saveRepo = saveRepo; _saveTypeRepo = saveTypeRepo; _incomeRepo = incomeRepo; }
public void Initialize() { clientsRepository = Substitute.For <IClientRepository>(); shareRepository = Substitute.For <IShareRepository>(); clientsSharesRepository = Substitute.For <IClientsSharesRepository>(); logger = Substitute.For <ILogger>(); clientsSharesRepository.LoadClientsSharesByID(Arg.Any <ClientsSharesInfo>()).Returns((callInfo) => { if (callInfo.Arg <ClientsSharesInfo>().ClientID == 1 && callInfo.Arg <ClientsSharesInfo>().ShareID == 2) { return(new ClientsSharesEntity() { ClientID = callInfo.Arg <ClientsSharesInfo>().ClientID, ShareID = callInfo.Arg <ClientsSharesInfo>().ShareID, Amount = 15 }); } else { return(null); } }); clientsRepository.LoadClientByID(Arg.Any <int>()).Returns((callInfo) => { if (callInfo.Arg <int>() == 1 || callInfo.Arg <int>() == 2) { return(new ClientEntity() { ClientID = callInfo.Arg <int>() }); } else { return(null); } }); shareRepository.LoadShareByID(Arg.Any <int>()).Returns((callInfo) => { if (callInfo.Arg <int>() == 1 || callInfo.Arg <int>() == 2) { return(new ShareEntity() { ShareID = callInfo.Arg <int>() }); } else { return(null); } }); }
public ShareImporter(IShareRepository repo, ProcessEngine engine) { this.repo = repo; this.engine = engine; }
public ShareService(IShareRepository shareRepository, IUserService userService) { this._shareRepository = shareRepository; this._userService = userService; }
public WallRepository(ApplicationDbContext dbContext) { this._db = dbContext; statusRepository = new StatusRepository(dbContext); shareRepository = new ShareRepository(dbContext); }
public void Init() { // init repository this._dbContext = new ApplicationDbContext(); this._chatRepository = new ChatRepository(this._dbContext); this._friendRepository = new FriendRepository(this._dbContext); this._privateMessageRepository = new PrivateMessageRepository(this._dbContext); this._statusRepository = new StatusRepository(this._dbContext); this._statusMessageRepository = new StatusMessageRepository(this._dbContext); this._statusLocationRepository = new StatusLocationRepository(this._dbContext); this._statusImageRepository = new StatusImageRepository(this._dbContext); this._likeRepository = new LikeRepository(this._dbContext); this._shareRepository = new ShareRepository(this._dbContext); this._commentRepository = new CommentRepository(this._dbContext); this._newFeedRepository = new NewFeedsRepository(this._dbContext); // get current connectionId this._curConnectionId = this.Context.ConnectionId; // get chatViewModel of User via connectionId this._curUserChat = this._chatRepository.GetUserByConnectionId(ConnectedUsers, this.Context.ConnectionId); // get friendListId this._friendListId = this._friendRepository.GetFriendListId(this._curUserChat.UserId).ToList(); // get friendListOnline this._friendListOnline = this._chatRepository.GetFriendListOnline(ConnectedUsers, this._friendListId, this._curUserChat.UserId); // get friendListConnectionId this._friendListConnectionId_Online = this._chatRepository.GetFriendList_ConnectionId(this._friendListOnline); this._allUserRelate_ConnectionId = this._chatRepository.GetAllUserRelate_ConnectionId(this._friendListConnectionId_Online, this._curUserChat.ConnectionId); }