public static void AddLocalizedRoutes(this MvcOptions options,
                                              Dictionary <string, LocalizedRouteInformation> localizedRoutes)
        {
            var conf = new ConventionConfiguration(new DictionaryAccessor(localizedRoutes));

            options.Conventions.Insert(0, new LocalizedRouteConvention(conf));
        }
 public static void AddLocalizedRoutes(this MvcOptions options,
                                       ConventionConfiguration config)
 {
     options.Conventions.Insert(0, new LocalizedRouteConvention(config));
 }
Exemple #3
0
 public LocalizedRouteConvention(ConventionConfiguration options)
 {
     _localizedRoutes = options.LocalizationsAccessor.GetLocalizations();
     _tokenReplacer   = options.TokenReplacer;
 }