Esempio n. 1
0
 public void GlobalSetup()
 {
     _httpContext  = new DefaultHttpContext();
     _serverTiming = Factory.CreateServerTiming();
     _callbacks    = Factory.CreateCallbacks();
     _middleware   = new ServerTimingMiddleware(_ => Task.CompletedTask, new ServerTimingOptions(), null);
 }
Esempio n. 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);
 }
Esempio n. 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);
        }