public RequestCultureMiddleware(RequestDelegate next, IOptions<RequestCultureOptions> options) { if (next == null) throw new ArgumentNullException(nameof(next)); if (options == null) throw new ArgumentNullException(nameof(options)); _next = next; _options = options.Value; }
public RequestCultureMiddleware(RequestDelegate next, IOptions <RequestCultureOptions> options) { if (next == null) { throw new ArgumentNullException(nameof(next)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } _next = next; _options = options.Value; }
public static IApplicationBuilder UseRequestCulture(this IApplicationBuilder builder, RequestCultureOptions options) { return builder.UseMiddleware<RequestCultureMiddleware>(Options.Create(options)); }
public static IApplicationBuilder UseRequestCulture(this IApplicationBuilder builder, RequestCultureOptions options) { return(builder.UseMiddleware <RequestCultureMiddleware>(Options.Create(options))); }