internal static QueryMiddleware Create <TMiddleware>() where TMiddleware : class { return(next => { MiddlewareFactory <TMiddleware, QueryDelegate> factory = MiddlewareActivator.CompileFactory <TMiddleware, QueryDelegate>(); return CreateDelegate((s, n) => factory(s, n), next); }); }
internal static FieldMiddleware Create <TMiddleware>() where TMiddleware : class { return(next => { var factory = MiddlewareActivator .CompileFactory <TMiddleware, FieldDelegate>(); return CreateDelegate <TMiddleware>( (s, n) => factory(s, n), next); }); }
public static FieldMiddleware Create <TMiddleware>( params object[] customParameters ) where TMiddleware : class { return(next => { MiddlewareFactory <TMiddleware, FieldDelegate> factory = MiddlewareActivator .CompileFactory <TMiddleware, FieldDelegate>(customParameters); return CreateDelegate( (s, n) => factory(s, n), next); }); }