ASP.NET Core Response.End()? : <p>I am trying to write a piece of middleware to keep certain client routes from being processed on the server. I looked at a lot of custom middleware classes that would short-circuit the response with </p>

<pre><code>context.Response.End();
</code></pre>

<p>I do not see the End() method in intellisense. How can I terminate the response and stop executing the http pipeline? Thanks in advance!</p>

<pre><code>public class IgnoreClientRoutes
{
    private readonly RequestDelegate _next;
    private List&lt;string&gt; _baseRoutes;

    //base routes correcpond to Index actions of MVC controllers
    public IgnoreClientRoutes(RequestDelegate next, List&lt;string&gt; baseRoutes) 
    {
        _next = next;
        _baseRoutes = baseRoutes;

    }//ctor


    public async Task Invoke(HttpContext context)
    {
        await Task.Run(() =&gt; {

            var path = context.Request.Path;

            foreach (var route in _baseRoutes)
            {
                Regex pattern = new Regex($"({route}).");
                if(pattern.IsMatch(path))
                {
                    //END RESPONSE HERE

                }

            }


        });

        await _next(context);

    }//Invoke()


}//class IgnoreClientRoutes
</code></pre>
