You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 20, 2018. It is now read-only.
public class MyMiddleware
{
private readonly RequestDelegate m_next;
public MyMiddleware( RequestDelegate next, Foo foo )
{
m_next = next;
// use foo
}
public async Task Invoke( HttpContext httpContext )
{
await m_next( httpContext );
}
}
Yet I keep getting:
System.InvalidOperationException
Unable to locate suitable constructor for type 'MyMiddleware'. Ensure the type is concrete and all parameters are accepted by a constructor.
How do I pass additional parameters in my middleware constructor?