Exemple #1
0
        public static TypeDescriber Get <T>()
        {
            if (!_types.TryGetValue(typeof(T), out TypeDescriber result))
            {
                _types.TryAdd(typeof(T), result = new TypeDescriber(typeof(T)));
            }

            return(result);
        }
Exemple #2
0
        public static TypeDescriber Get(object obj)
        {
            Type type = obj.GetType();

            if (!_types.TryGetValue(type, out TypeDescriber result))
            {
                _types.TryAdd(type, result = new TypeDescriber(type));
            }

            return(result);
        }