Example #1
0
        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));
        }
Example #2
0
 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));
 }
Example #3
0
 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));
 }