Exemple #1
0
 public LocalizedRoutingProviderTests()
 {
     _controllerActionDescriptorProvider = Substitute.For <IControllerActionDescriptorProvider>();
     _localizedRoutingProvider           = new LocalizedRouteProvider(
         _controllerActionDescriptorProvider,
         Options.Create(new Microsoft.AspNetCore.Builder.RequestLocalizationOptions
     {
         SupportedCultures = new List <CultureInfo> {
             new CultureInfo("en-US")
         }
     })
         );
 }
 public LocalizedRouteProvider(IControllerActionDescriptorProvider controllerActionDescriptorProvider,
                               IOptions <RequestLocalizationOptions> localizationOptions)
 {
     _controllerActionDescriptorProvider = controllerActionDescriptorProvider;
     _supportedCultures = localizationOptions.Value.SupportedCultures;
 }