// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Globalization; using Microsoft.AspNet.Localization; namespace Microsoft.AspNet.Builder { /// /// Extension methods for adding the to an application. /// public static class ApplicationBuilderExtensions { /// /// Adds the to automatically set culture information for /// requests based on information provided by the client. /// /// The . /// The options to configure the middleware with. /// The . public static IApplicationBuilder UseRequestLocalization( this IApplicationBuilder app, RequestLocalizationOptions options) { if (app == null) { throw new ArgumentNullException(nameof(app)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } return app.UseMiddleware(options); } } }