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) { options ??= new ApiResponseOptions(); return(builder.UseMiddleware <ApiResponseMiddleware>(options)); }