public RouteTranslationBuilder WhereUntranslated() { if (CurrentRouteSelectorFunc != null) { Logger.LogWarning($"{nameof(CurrentRouteSelectorFunc)} is not null, will be overridden."); } CurrentRouteSelectorFunc = (Func <UntranslatedRoutesRouteSelector>)(() => new UntranslatedRoutesRouteSelector() { Culture = CurrentCultures.Single(), Localizer = RouteTranslationConfiguration.Localizer, }); return(this); }
public RouteTranslationBuilder TranslateController(string template) { IRouteProcessor routeProcessor = new TranslateControllerRouteProcessor(RouteTranslationConfiguration, LoggerFactory.CreateLogger <TranslateControllerRouteProcessor>()) { Culture = CurrentCultures.Single(), Template = template, }; RouteTranslationStore.Add(new RouteSelectorProcessorPair { Selector = CurrentRouteSelectorFunc(), Processor = routeProcessor, }); return(this); }