コード例 #1
0
        public async Task GetCompanyInformation()
        {
            StockId id     = "sh.600519";
            var     result = await TuShare.GetCompanyInformation(id);

            Assert.AreEqual(result.Id.ToString("b"), id.ToString("b"));
        }
コード例 #2
0
 /// <summary>
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="api"></param>
 /// <param name="args"></param>
 /// <returns></returns>
 public T Fetch <T>(Api api, params object[] args)
 {
     string[] arguments = args.Select(
         argument => argument switch {
         DateTime arg => arg.ToString("yyyy-MM-dd"),
         StockId arg => arg.ToString("b"),
         null => null,
         _ => argument.ToString()
     }