/// <summary> /// Maps a ConfigSection to a XmlTranslationsConfig object /// </summary> public static XmlTranslationsConfig GetXmlTranslationsConfig(this IConfigurationSection config) { var conf = new XmlTranslationsConfig(); config.Bind(conf); return(conf); }
/// <summary> /// Initialize Xml Translations /// /// Using this service requires to register /// IActionContextAccessor service /// ISupportedLangsService service /// IMemoryCache service /// </summary> public static void InitXmlTranslations(this IServiceCollection services, XmlTranslationsConfig config, ILogger logger = null) => services.InitXmlTranslations(new[] { config }, logger);