private static void AddType(Type type) { string shortName = type.Name; if (TypeMap.ContainsKey(shortName)) { shortName = type.FullName; if (TypeMap.ContainsKey(shortName)) { return; } } ShortNames.Add(type, shortName); TypeMap.Add(shortName, type); if (!type.IsGenericType) { return; } GenericTypeMap.Add(shortName.Replace("`1", ""), type); GenericShortNames.Add(type, shortName.Replace("`1", "")); }
internal bool IsMatch(string name) { return (ShortNames.Contains(name, StringComparer.Ordinal) || LongNames.Contains(name, StringComparer.Ordinal)); }