CheckArgumentTypes() private static method

private static CheckArgumentTypes ( Type types, MethodInfo method ) : bool
types System.Type
method System.Reflection.MethodInfo
return bool
示例#1
0
        private static bool CheckArgumentTypesAndReturnType(Type[] types, MethodInfo method, Type returnType)
        {
            bool result;

            if (returnType != method.ReturnType)
            {
                Debug.LogWarning(string.Concat(new string[]
                {
                    "Return type mismatch. Expected: ",
                    returnType.ToString(),
                    " Got: ",
                    method.ReturnType.ToString(),
                    " in ",
                    method.DeclaringType.ToString(),
                    ".",
                    method.Name
                }));
                result = false;
            }
            else
            {
                result = AssetModificationProcessorInternal.CheckArgumentTypes(types, method);
            }
            return(result);
        }
示例#2
0
 private static bool CheckArguments(object[] args, MethodInfo method)
 {
     Type[] array = new Type[args.Length];
     for (int i = 0; i < args.Length; i++)
     {
         array[i] = args[i].GetType();
     }
     return(AssetModificationProcessorInternal.CheckArgumentTypes(array, method));
 }
示例#3
0
 private static bool CheckArguments(object[] args, MethodInfo method)
 {
     System.Type[] types = new System.Type[args.Length];
     for (int index = 0; index < args.Length; ++index)
     {
         types[index] = args[index].GetType();
     }
     return(AssetModificationProcessorInternal.CheckArgumentTypes(types, method));
 }
示例#4
0
 private static bool CheckArgumentTypesAndReturnType(System.Type[] types, MethodInfo method, System.Type returnType)
 {
     if (returnType == method.ReturnType)
     {
         return(AssetModificationProcessorInternal.CheckArgumentTypes(types, method));
     }
     Debug.LogWarning((object)("Return type mismatch. Expected: " + returnType.ToString() + " Got: " + method.ReturnType.ToString() + " in " + method.DeclaringType.ToString() + "." + method.Name));
     return(false);
 }