예제 #1
0
        public virtual bool TryGetDetail(string key, out object detail)
        {
            if (string.IsNullOrEmpty(key))
            {
                throw new ArgumentNullException("key");
            }

            bool containsDetail = false;

            detail = null;
            if (Ids.ContainsKey(key))
            {
                containsDetail = true;
                detail         = Ids[key];
            }
            else if (Strings.ContainsKey(key))
            {
                containsDetail = true;
                detail         = Strings[key];
            }
            else if (Ints.ContainsKey(key))
            {
                containsDetail = true;
                detail         = Ints[key];
            }
            else if (Doubles.ContainsKey(key))
            {
                containsDetail = true;
                detail         = Doubles[key];
            }

            return(containsDetail);
        }
예제 #2
0
파일: DataManager.cs 프로젝트: cyv-cg/FE
    public static int GetInt(string key)
    {
        if (Ints == null)
        {
            Ints = new Dictionary <string, int>();
        }

        return((Ints.ContainsKey(key)) ? Ints[key] : 0);
    }