public static void UseTraceIdMiddleware(this IApplicationBuilder app, TraceIdMiddlewareOptions correlationIdMiddlewareOptions = null)
 {
     correlationIdMiddlewareOptions = correlationIdMiddlewareOptions ?? new TraceIdMiddlewareOptions();
     app.UseMiddleware <TraceIdMiddleware>(Options.Create(correlationIdMiddlewareOptions));
 }
 public TraceIdMiddleware(RequestDelegate next, IOptions <TraceIdMiddlewareOptions> options)
 {
     _next = next;
     _middlewareOptions = options.Value;
 }