示例#1
0
 public void GlobalSetup()
 {
     _httpContext  = new DefaultHttpContext();
     _serverTiming = Factory.CreateServerTiming();
     _callbacks    = Factory.CreateCallbacks();
     _middleware   = new ServerTimingMiddleware(_ => Task.CompletedTask, new ServerTimingOptions(), null);
 }
示例#2
0
 public void GlobalSetup()
 {
     _serverTimingOptions = new ServerTimingOptions
     {
         InvokeCallbackServices = true
     };
     _serverTimingOptions.WithRequestTimingOptions((_, requestOptions) => requestOptions.WriteHeader = true);
     _middleware = new ServerTimingMiddleware(_ => Task.CompletedTask, _serverTimingOptions, null);
     _callbacks  = Factory.CreateCallbacks(1);
 }
示例#3
0
        public void GlobalSetup()
        {
            _httpContext  = new DefaultHttpContext();
            _serverTiming = Factory.CreateServerTiming();

            _serverTimingOptions  = new ServerTimingOptions();
            _requestTimingOptions = new RequestTimingOptions {
                WriteHeader = true
            };
            _middleware = new ServerTimingMiddleware(_ => Task.CompletedTask, _serverTimingOptions, null);
        }