public MainPage() { this.InitializeComponent(); logger = new LcdDisplayLogger(); if (sentimentProvider == null) { sentimentProvider = new MicrosoftCognitiveApiSentimentProvider(logger); } if (ledController == null) { ledController = new RgbLedController(); } int period = 3; ThreadPoolTimer PeriodicTimer = ThreadPoolTimer.CreatePeriodicTimer(StartSentimentLoop, TimeSpan.FromHours(period)); StartSentimentLoop(null); }
public TradingBot(ISentimentProvider sentimentProvider) { _sentimentProvider = sentimentProvider ?? throw new ArgumentNullException(nameof(sentimentProvider)); }
public SentimentService(ISentimentProvider sentimentProvider) { _sentimentProvider = sentimentProvider; }
public APIController(ISentimentProvider sentimentProvider, IStockProvider stockProvider) { _sentimentProvider = sentimentProvider; _stockProvider = stockProvider; }