CheckArgumentTypesAndReturnType() private static method

private static CheckArgumentTypesAndReturnType ( Type types, MethodInfo method, Type returnType ) : bool
types System.Type
method System.Reflection.MethodInfo
returnType System.Type
return bool
示例#1
0
 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);
 }
示例#2
0
 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));
 }
示例#3
0
 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));
 }