//private FakeHttpContext FakeHttpContext { get; } public MiddlerContext(HttpContext httpContext, IMiddlerOptions middlerOptions) { HttpContext = httpContext; MiddlerOptions = middlerOptions; MiddlerRequestContext = new MiddlerRequestContext(httpContext, middlerOptions); MiddlerResponseContext = new MiddlerResponseContext(); MiddlerResponseContext.Body = new AutoStream(opts => opts .WithMemoryThreshold(middlerOptions.AutoStreamDefaultMemoryThreshold) .WithFilePrefix("middler"), Request.RequestAborted); }
public void SetRouteData(IDictionary <string, IRouteConstraint> constraints) { MiddlerRequestContext.SetRouteData(constraints); }