public TickerController( ITickerService tickerService, IMapper mapper) { _tickerService = tickerService; _mapper = mapper; }
/// <summary> /// Register a ticker service to use in BotHandlerService /// </summary> public Builder RegisterTickerService(ITickerService tickerService) { Preconditions.CheckNotNull(tickerService); _botHandlerService._tickerServices.Add(tickerService); return(this); }
public TicketController(IAction <TickedDTO, Ticket> action, IUserService userService, IEventService eventService, ITickerService tickerService) { _actionTicket = action; _userService = userService; _eventService = eventService; _tickerService = tickerService; }
public OrderController(IOrderService orderService, IAction <OrderDTO, Order> action, IUserService userService, ITickerService tickerService) { _orderService = orderService; _action = action; _userService = userService; _tickerService = tickerService; }
/// <summary> /// 複数のWebSocketを管理する /// </summary> public WebSocketService(IApplicationLifetime appLifetime, ILogger <WebSocketService> logger, IConfiguration configuration, ApplicationDbContext dbContext, ITickerService tickerService) { MyWebSockets = new List <MyWebSocket>(); Logger = logger; DbContext = dbContext; Configuration = configuration; AppLifetime = appLifetime; TickerService = tickerService; }
public DBInit(IMarketDataService marketDataSvc, ITickerService tickerSvc, IPortfolioService PortfolioSvc, ITradeService tradeSvc) { this.marketDataSvc = marketDataSvc; this.tickerSvc = tickerSvc; this.PortfolioSvc = PortfolioSvc; this.tradeSvc = tradeSvc; xmlDBInit(); }
public frmPortfolio(IModelMapper mapper, frmAddTrade frmAddTrade , ITickerService tickerSvc , IPortfolioService portfolioSvc , ITradeService tradeSvc , IPnLReportService pnlReportSvc) { InitializeComponent(); this.tickerSvc = tickerSvc; this.portfolioSvc = portfolioSvc; this.tradeSvc = tradeSvc; this.mapper = mapper; this.frmAddTrade = frmAddTrade; this.pnlReportSvc = pnlReportSvc; dtPnLAsOfDate.Value = new DateTime(2021, 04, 12); }
public frmAddTrade(IModelMapper mapper, ITradeService tradeSvc, ITickerService tickerSvc) { InitializeComponent(); this.mapper = mapper; this.tradeSvc = tradeSvc; this.tickerSvc = tickerSvc; cmbTradeType.DataSource = Enum.GetValues(typeof(TradeType)); cmbTicker.DataSource = this.tickerSvc.GetAll(); cmbTicker.DisplayMember = "Symbol"; cmbTicker.ValueMember = "Id"; lblTransactionAmount.Text = ""; lblTransactionAmountwCost.Text = ""; lblTransactionAmountwCost.Text = ""; }
public BuyAndHoldController(IBuyAndHoldService buyAndHoldService, ITickerService tickerService, INavService navService, ISecurityService securityService, IBuyAndHoldTransactionDtoMap buyAndHoldTransactionDtoMap, IBuyAndHoldRawTransactionMapper buyAndHoldRawTransactionMapper, IBuyAndHoldTransactionLibrary buyAndHoldTransactionLibrary, IBuyAndHoldRawTransactionLibrary buyAndHoldRawTransactionLibrary) { _buyAndHoldService = buyAndHoldService; _tickerService = tickerService; _navService = navService; _securityService = securityService; _buyAndHoldTransactionDtoMap = buyAndHoldTransactionDtoMap; _buyAndHoldRawTransactionMapper = buyAndHoldRawTransactionMapper; _buyAndHoldTransactionLibrary = buyAndHoldTransactionLibrary; _buyAndHoldRawTransactionLibrary = buyAndHoldRawTransactionLibrary; }
public TickerServiceTests() { // Setup an actual in-memory Sqlite for db mocking var optionsBuilder = new DbContextOptionsBuilder <ForexMinerHeimdallrDbContext>(); optionsBuilder.UseSqlite("Filename=:memory:"); _dbContext = new ForexMinerHeimdallrDbContext(optionsBuilder.Options); _dbContext.Database.OpenConnection(); _dbContext.Database.Migrate(); // Auto mapper var contractContract = new ContractContractMappings(); var databaseContract = new DatabaseContractMappings(); var oandaContract = new OandaContractMappings(); var configuration = new MapperConfiguration(cfg => { cfg.AddProfile(contractContract); cfg.AddProfile(databaseContract); cfg.AddProfile(oandaContract); }); _mapper = new Mapper(configuration); // Mocks _configurationMock = new Mock <IConfiguration>(); _configurationMock.SetupGet(c => c[It.Is <string>(cv => cv == "forex-miner-thor:Max-Retries")]).Returns("3"); _httpClientFactoryMock = new Mock <IHttpClientFactory>(); _connectionsSecretServiceMock = new Mock <IConnectionsSecretService>(); _oandaApiConnectionFactoryMock = new Mock <IOandaApiConnectionFactory>(); _instrumentStorageServiceMock = new Mock <IInstrumentStorageService>(); // Class under test _tickerService = new TickerService( _configurationMock.Object, _dbContext, _httpClientFactoryMock.Object, _connectionsSecretServiceMock.Object, _mapper, _oandaApiConnectionFactoryMock.Object, _instrumentStorageServiceMock.Object ); }
public BotServices(ILoggingService loggingService, IEventService eventService, ITickerService tickerService, IDefenceService defenceService, INewsService newsService, IKarmaService karmaService, IReplyService replyService, IStatsService statsService, IServerService serverService, IUrlService urlService, IJobService jobs) { Logging = loggingService; Events = eventService; Ticker = tickerService; Defence = defenceService; News = newsService; Karma = karmaService; AI = replyService; Stats = statsService; Server = serverService; Tools = urlService; Jobs = jobs; }
public EventService(TicketsContext context, IVenueService venueService, ITickerService tickerService) { _context = context; _venueService = venueService; _tickerService = tickerService; }
public TickerAppService(ITickerService tickerService)//, ITickerRepository tickerRepository) { //_tickerRepository = tickerRepository; _tickerService = tickerService; }
public TickerController(ITickerService tickerService) { _tickerService = tickerService; }