public async Task GetSymbolsAsync() { // Act _api.Login(); IReadOnlyList <SymbolModel> symbols = await _api.GetSymbolsAsync() .ConfigureAwait(false); _api.Logout(); Assert.IsNotNull(symbols); Assert.AreNotEqual(0, symbols.Count); }
public override void GetMarketData(ProviderModel provider, Action <object> update) { DateTime now = DateTime.Now; if (!_symbolsUpdated) { IReadOnlyList <SymbolModel> symbols = _api.GetSymbolsAsync().Result; UpdateSymbols(provider, symbols, true); update(provider.Symbols); _symbolsUpdated = true; _api.SubscribeMarketDataAsync(provider.Symbols, update).Wait(); } provider.LastDate = now; }
public override void GetMarketData(ProviderModel provider, Action <object> update) { IReadOnlyList <SymbolModel> symbols = _api.GetSymbolsAsync(update).Result; }