Beispiel #1
0
 public ApiResponseMiddleware(RequestDelegate next, ApiResponseOptions options, ILogger <ApiResponseMiddleware> logger)
 {
     _next    = next;
     _options = options;
     _logger  = logger;
 }
 public static IApplicationBuilder UseApiResponseAndExceptionWrapper(this IApplicationBuilder builder, ApiResponseOptions options = default(ApiResponseOptions))
 {
     options = options ?? new ApiResponseOptions();
     return(builder.UseMiddleware <ApiResponseMiddleware>(options));
 }