public CryptoInfoViewModel(ICryptoInfoService cryptoInfoService, ICryptoCurrencyService cryptoCurrencyService) { _cryptoInfoService = cryptoInfoService; _cryptoCurrencyService = cryptoCurrencyService; //check if current user is not null //get all by current user id -> List<CryptoCurrencies> //for each Lables.add(new CryptoWidget(crypto.Ticker)) BTC = new CryptoWidget("BTC"); ETH = new CryptoWidget("ETH"); BNB = new CryptoWidget("BNB"); USDT = new CryptoWidget("USDT"); ADA = new CryptoWidget("ADA"); DOT = new CryptoWidget("DOT"); XRP = new CryptoWidget("XRP"); UNI = new CryptoWidget("UNI"); LTC = new CryptoWidget("LTC"); LINK = new CryptoWidget("LINK"); Labels.Add(BTC); Labels.Add(ETH); Labels.Add(BNB); Labels.Add(USDT); Labels.Add(ADA); Labels.Add(DOT); Labels.Add(XRP); Labels.Add(UNI); Labels.Add(LTC); Labels.Add(LINK); timer = new(new TimerCallback(GetInfo), null, 0, 5000); }
public MainTask( ILogger <MainTask> logger, IBitCoinTradeService bitCoinTradeService, IGenericService genericService, INotificationService notificationService, IDecisionMakerService decisionMakerService, ITaskAwaitToBuy awaitToBuyTask, ITaskBuy BuyTask, ITaskSell SellTask, ITaskAwaitToSell awaiToSellTask, ICryptoCurrencyService cryptoCurrencyService ) { _notificateBotIsAlive = true; this._logger = logger; this._bitCoinTradeService = bitCoinTradeService; this._genericService = genericService; this._notificationService = notificationService; this._decisionMakerService = decisionMakerService; this._awaitToBuyTask = awaitToBuyTask; this._buyTask = BuyTask; this._cryptoCurrencyService = cryptoCurrencyService; this._sellTask = SellTask; this._awaiToSellTask = awaiToSellTask; }
public GetCryptoCurrencyExchangeRatesQueryHandler(ICryptoCurrencyService cryptoCurrencyService, IConfiguration configuration, IExchangeRateService exchangeRateService) { _cryptoCurrencyService = cryptoCurrencyService; _configuration = configuration; _exchangeRateService = exchangeRateService; }
public ApplicationService(ICryptoCurrencyService cryptoCurrencyService, ILoggerFactory loggerFactory, IConsoleWrapper console) { _cryptoCurrencyService = cryptoCurrencyService; _logger = loggerFactory.CreateLogger(GetType()); _console = console; }
public GetCryptoCurrencyQuotesCronJob(IScheduleConfig <GetCryptoCurrencyQuotesCronJob> config, ILogger <GetCryptoCurrencyQuotesCronJob> logger, ICryptoCurrencyService cryptoCurrencyService) : base(config.CronExpression, config.TimeZoneInfo) { _logger = logger; _cryptoCurrencyService = cryptoCurrencyService; }
public DecisionMakerService( IBitCoinTradeService bitCoinTradeService, ILogger <DecisionMakerService> logger, ICryptoCurrencyService cryptoCurrencyService) { _bitCoinTradeService = bitCoinTradeService; _logger = logger; _cryptoCurrencyService = cryptoCurrencyService; }
private void Initialize() { var loggerFactory = new Mock <ILoggerFactory>(); _logger = new Mock <ILogger>(); _logger.Setup(x => x.Log(It.IsAny <LogLevel>(), It.IsAny <EventId>(), It.Is <It.IsAnyType>((v, t) => true), It.IsAny <Exception>(), It.Is <Func <It.IsAnyType, Exception, string> >((v, t) => true))).Verifiable(); loggerFactory.Setup(x => x.CreateLogger(It.IsAny <string>())).Returns(_logger.Object); _coinMarketCapProxy = new Mock <ICoinMarketCapProxy>(); _exchangeRatesProxy = new Mock <IExchangeRatesProxy>(); _appSettings = new AppSettings(); _cryptoCurrencyService = new CryptoCurrencyService(loggerFactory.Object, _coinMarketCapProxy.Object, _exchangeRatesProxy.Object, Options.Create(_appSettings)); }
public static CryptoInfoViewModel LoadCryptoInfoViewModel(ICryptoInfoService cryptoInfoService, ICryptoCurrencyService cryptoCurrencyService) { if (cryptoInfoViewModel == null) { cryptoInfoViewModel = new CryptoInfoViewModel(cryptoInfoService, cryptoCurrencyService); } return(cryptoInfoViewModel); }
public CurrencyController(ICryptoCurrencyService coinService) { this._coinService = coinService; }
public ShoppingCartService(IShoppingCartRepository shoppingCartRepository, ICryptoCurrencyService cryptoCurrencyService) { _shoppingCartRepository = shoppingCartRepository; _cryptoCurrencyService = cryptoCurrencyService; }
public GetAllCryptoCurrenciesQueryHandler(ICryptoCurrencyService cryptoCurrencyService) { _cryptoCurrencyService = cryptoCurrencyService; }
public CryptoCurrencyController(ICryptoCurrencyService cryptoCurrencyService) { _cryptoCurrencyService = cryptoCurrencyService; }
public GetCryptoCurrencyPriceQueryHandler(ICryptoCurrencyService cryptoCurrencyService) { _cryptoCurrencyService = cryptoCurrencyService; }