예제 #1
0
        //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);
        }
예제 #2
0
 public void SetRouteData(IDictionary <string, IRouteConstraint> constraints)
 {
     MiddlerRequestContext.SetRouteData(constraints);
 }