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