System.MethodReflectionLibrary.Query C# (CSharp) Méthode

Query() public static méthode

public static Query ( Type type, string message, &data ) : bool
type Type
message string
Résultat bool
        public static bool Query<T>(this Type type, string message, out T data, params object[] parameters)
        {
            var methodInfo = type.GetMethod(message, ReflectionLibrary.STATIC_MEMBER_BINDING_FLAGS, null,
                parameters.GetTypeArray(), null);

            var valid = methodInfo != null && methodInfo.ReturnType == typeof(T);

            data = valid ? (T) methodInfo.Invoke(null, parameters) : default;

            return valid;
        }

Same methods

MethodReflectionLibrary::Query ( Type type, string message, object &data ) : bool
MethodReflectionLibrary::Query ( object o, string message, object &data ) : bool
MethodReflectionLibrary::Query ( object o, string message, &data ) : bool