示例#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;
 }
 public async Task InvokeAsync(HttpContext context, IApplicationRequestContext requestContext)
 {
     _logger.LogInformation($"X-Guid : {requestContext.Id}");
     await _next(context);
 }
 public DiagnosticController(IApplicationRequestContext requestContext, IOptions <DiagnosticOptions> options)
 {
     _requestContext = requestContext;
     _options        = options.Value;
 }