Пример #1
0
        public async Task Invoke(HttpContext context)
        {
            var session = new ProfileSession();

            try
            {
                session.Start();
                await _next.Invoke(context);
            }
            finally
            {
                session.Stop();
                _logger.LogInformation("Request profiling data {0}.", session.ToJson());
            }
        }