public ReflectionTypeInfo FindOrAdd(Type type) { ReflectionTypeInfo info; if (!mTypesInfo.TryGetValue(type, out info)) { info = new ReflectionTypeInfo(type); mTypesInfo.Add(type, info); } return(info); }
public ReflectionTypeInfo FindType(string typeName, bool isFullName) { ReflectionTypeInfo result = default; ProfilingUtility.BeginSample("ReflectionAssemblyInfo.FindType"); foreach (var typeInfo in mTypesInfo.Values) { if ((!isFullName && typeInfo.type.Name == typeName) || (isFullName && typeInfo.type.FullName == typeName)) { result = typeInfo; break; } } ProfilingUtility.EndSample(); return(result); }