コード例 #1
0
 public TrackRequestContextMiddleware(RequestDelegate next, IApplicationRequestContext requestContext)
 {
     _next           = next;
     _requestContext = requestContext;
 }
コード例 #2
0
 public async Task InvokeAsync(HttpContext context, IApplicationRequestContext requestContext)
 {
     _logger.LogInformation($"X-Guid : {requestContext.Id}");
     context.Response.Headers.Add("X-Guid", requestContext.Id.ToString());
     await _next(context);
 }
コード例 #3
0
 public DiagnosticController(IApplicationRequestContext requestContext, IOptionsMonitor <DiagnosticOptions> options)
 {
     _requestContext = requestContext;
     _options        = options.CurrentValue;
 }
コード例 #4
0
 public async Task InvokeAsync(HttpContext context, IApplicationRequestContext requestContext)
 {
     _logger.LogInformation($"X-Guid : {requestContext.Id}");
     await _next(context);
 }
コード例 #5
0
 public DiagnosticController(IApplicationRequestContext requestContext, IOptions <DiagnosticOptions> options)
 {
     _requestContext = requestContext;
     _options        = options.Value;
 }