コード例 #1
0
        public HashSet <string> Resolve(string code)
        {
            code = code.ToUpper();

            var set = _cache.GetValue(code);

            if (set == null)
            {
                var slist = ParamData.FindSimilarStation(code);
                if (slist == null)
                {
                    set = new HashSet <string>()
                    {
                        code
                    }
                }
                ;
                else
                {
                    set = slist.Select(s => s.Code).MapToHashSet();
                }

                foreach (var s in set)
                {
                    _cache.AddOrUpdate(s, set);
                }
            }

            return(set);
        }