public static object?CallStatic(this IServiceProvider services, Type type, string name, Type?returnType = null, bool allowPrivate = false) { MethodInfo?cached = null; return(services.CallStatic(ref cached, type, name, returnType: returnType, allowPrivate: allowPrivate)); }
public static object CallStatic <T>(this IServiceProvider services, Type type, string name, bool allowPrivate = false) { return((T?)services.CallStatic(type, name, returnType: typeof(T), allowPrivate: allowPrivate)); }
public static T CallStatic <T>(this IServiceProvider services, ref MethodInfo?cachedMethod, Type type, string name, bool allowPrivate = false) { return((T?)services.CallStatic(ref cachedMethod, type, name, returnType: typeof(T), allowPrivate: allowPrivate)); }