コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResponseHeaderMiddleware"/> class.
 /// </summary>
 /// <param name="next"></param>
 /// <param name="options"><see cref="ResponseHeaderMiddlewareOptions"/> to use to customize the current <see cref="ResponseHeaderMiddleware"/> behavior.</param>
 public ResponseHeaderMiddleware(RequestDelegate next, ResponseHeaderMiddlewareOptions options)
 {
     _next    = next ?? throw new ArgumentNullException(nameof(next));
     _options = options ?? new ResponseHeaderMiddlewareOptions();
 }
コード例 #2
0
 public static void ConfigureResponseHeaderMiddleware(this IApplicationBuilder app, ResponseHeaderMiddlewareOptions options)
 {
     app.UseMiddleware <ResponseHeaderMiddleware>(options);
 }