コード例 #1
0
        public static async Task <List <IndexConstituent> > GetIndexConstituents(string indexCode)
        {
            var constituents = DataDao.GetIndexConstituents(indexCode);

            if (DataHelper.IsDataReady(constituents?.FirstOrDefault()))
            {
                return(constituents);
            }
            else
            {
                constituents = await SwService.GetIndexConstituents(indexCode);

                DataDao.UpdateIndexConstituents(constituents);
                return(constituents);
            }
        }