internal static MethodInfo[] GetIsOpenForEditMethods() { if (AssetModificationProcessorInternal.isOpenForEditMethods == null) { List <MethodInfo> list = new List <MethodInfo>(); foreach (Type current in AssetModificationProcessorInternal.AssetModificationProcessors) { MethodInfo method = current.GetMethod("IsOpenForEdit", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (method != null) { AssetModificationProcessorInternal.RequireTeamLicense(); string empty = string.Empty; bool flag = false; Type[] types = new Type[] { empty.GetType(), empty.GetType().MakeByRefType() }; if (AssetModificationProcessorInternal.CheckArgumentTypesAndReturnType(types, method, flag.GetType())) { list.Add(method); } } } AssetModificationProcessorInternal.isOpenForEditMethods = list.ToArray(); } return(AssetModificationProcessorInternal.isOpenForEditMethods); }
private static bool CheckArgumentsAndReturnType(object[] args, MethodInfo method, Type returnType) { Type[] array = new Type[args.Length]; for (int i = 0; i < args.Length; i++) { array[i] = args[i].GetType(); } return(AssetModificationProcessorInternal.CheckArgumentTypesAndReturnType(array, method, returnType)); }
private static bool CheckArgumentsAndReturnType(object[] args, MethodInfo method, System.Type returnType) { System.Type[] types = new System.Type[args.Length]; for (int index = 0; index < args.Length; ++index) { types[index] = args[index].GetType(); } return(AssetModificationProcessorInternal.CheckArgumentTypesAndReturnType(types, method, returnType)); }