private static System.Type ResolveType(string name, Assembly callingAssembly, string sourceInfo) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type APIUpdaterRuntimeServices.\u003CResolveType\u003Ec__AnonStorey7 typeCAnonStorey7 = new APIUpdaterRuntimeServices.\u003CResolveType\u003Ec__AnonStorey7(); // ISSUE: reference to a compiler-generated field typeCAnonStorey7.name = name; // ISSUE: reference to a compiler-generated method System.Type type1 = APIUpdaterRuntimeServices.ComponentsFromUnityEngine.FirstOrDefault <System.Type>(new Func <System.Type, bool>(typeCAnonStorey7.\u003C\u003Em__D)); if (type1 != null) { // ISSUE: reference to a compiler-generated field Debug.LogWarningFormat("[{1}] Type '{0}' found in UnityEngine, consider replacing with go.AddComponent<{0}>();", new object[2] { (object)typeCAnonStorey7.name, (object)sourceInfo }); return(type1); } // ISSUE: reference to a compiler-generated field System.Type type2 = callingAssembly.GetType(typeCAnonStorey7.name); if (type2 != null) { Debug.LogWarningFormat("[{1}] Component type '{0}' found on caller assembly. Consider replacing the call method call with: AddComponent<{0}>()", new object[2] { (object)type2.FullName, (object)sourceInfo }); return(type2); } // ISSUE: reference to a compiler-generated method System.Type type3 = ((IEnumerable <Assembly>)AppDomain.CurrentDomain.GetAssemblies()).SelectMany <Assembly, System.Type>((Func <Assembly, IEnumerable <System.Type> >)(a => (IEnumerable <System.Type>)a.GetTypes())).SingleOrDefault <System.Type>(new Func <System.Type, bool>(typeCAnonStorey7.\u003C\u003Em__F)); if (type3 != null) { Debug.LogWarningFormat("[{2}] Component type '{0}' found on assembly {1}. Consider replacing the call method with: AddComponent<{0}>()", (object)type3.FullName, (object)type3.Assembly.Location, (object)sourceInfo); return(type3); } // ISSUE: reference to a compiler-generated field Debug.LogErrorFormat("[{1}] Component Type '{0}' not found.", new object[2] { (object)typeCAnonStorey7.name, (object)sourceInfo }); return((System.Type)null); }
private static System.Type ResolveType(string name, Assembly callingAssembly, string sourceInfo) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type APIUpdaterRuntimeServices.\u003CResolveType\u003Ec__AnonStorey7 typeCAnonStorey7 = new APIUpdaterRuntimeServices.\u003CResolveType\u003Ec__AnonStorey7(); // ISSUE: reference to a compiler-generated field typeCAnonStorey7.name = name; // ISSUE: reference to a compiler-generated method System.Type type1 = APIUpdaterRuntimeServices.ComponentsFromUnityEngine.FirstOrDefault<System.Type>(new Func<System.Type, bool>(typeCAnonStorey7.\u003C\u003Em__D)); if (type1 != null) { // ISSUE: reference to a compiler-generated field Debug.LogWarningFormat("[{1}] Type '{0}' found in UnityEngine, consider replacing with go.AddComponent<{0}>();", new object[2] { (object) typeCAnonStorey7.name, (object) sourceInfo }); return type1; } // ISSUE: reference to a compiler-generated field System.Type type2 = callingAssembly.GetType(typeCAnonStorey7.name); if (type2 != null) { Debug.LogWarningFormat("[{1}] Component type '{0}' found on caller assembly. Consider replacing the call method call with: AddComponent<{0}>()", new object[2] { (object) type2.FullName, (object) sourceInfo }); return type2; } // ISSUE: reference to a compiler-generated method System.Type type3 = ((IEnumerable<Assembly>) AppDomain.CurrentDomain.GetAssemblies()).SelectMany<Assembly, System.Type>((Func<Assembly, IEnumerable<System.Type>>) (a => (IEnumerable<System.Type>) a.GetTypes())).SingleOrDefault<System.Type>(new Func<System.Type, bool>(typeCAnonStorey7.\u003C\u003Em__F)); if (type3 != null) { Debug.LogWarningFormat("[{2}] Component type '{0}' found on assembly {1}. Consider replacing the call method with: AddComponent<{0}>()", (object) type3.FullName, (object) type3.Assembly.Location, (object) sourceInfo); return type3; } // ISSUE: reference to a compiler-generated field Debug.LogErrorFormat("[{1}] Component Type '{0}' not found.", new object[2] { (object) typeCAnonStorey7.name, (object) sourceInfo }); return (System.Type) null; }