コード例 #1
0
        public async Task<RealTimeStockItem> GetRealTimeStockAsync(StockInfoItem stockItem)
        {
            GoogleStockClient client = new GoogleStockClient();
            RealTimeStockModel stockData = await client.QueryStockAsync(stockItem.Id);

            return RealTimeStockItem.ConvertFrom(stockData);
        }
コード例 #2
0
 public void QueryStockTest()
 {
     GoogleStockClient query = new GoogleStockClient();
     RealTimeStockModel item = query.QueryStockAsync("2115").GetAwaiter().GetResult();
     Assert.IsNotNull(item.CurrentPrice);
 }