/// <summary>
        /// Gets all string resources including those for parent cultures.
        /// </summary>
        /// <param name="htmlLocalizer">The <see cref="IHtmlLocalizer"/>.</param>
        /// <returns>The string resources.</returns>
        public static IEnumerable <LocalizedString> GetAllStrings(this IHtmlLocalizer htmlLocalizer)
        {
            if (htmlLocalizer == null)
            {
                throw new ArgumentNullException(nameof(htmlLocalizer));
            }

            return(htmlLocalizer.GetAllStrings(includeParentCultures: true));
        }
 /// <inheritdoc />
 public IEnumerable <LocalizedString> GetAllStrings(bool includeParentCultures)
 {
     return(_htmlLocalizer.GetAllStrings(includeParentCultures));
 }
Esempio n. 3
0
 /// <inheritdoc />
 public virtual IEnumerable <LocalizedString> GetAllStrings(bool includeParentCultures) =>
 _localizer.GetAllStrings(includeParentCultures);
Esempio n. 4
0
 /// <inheritdoc />
 public IEnumerable <LocalizedString> GetAllStrings(bool includeAncestorCultures) =>
 _localizer.GetAllStrings(includeAncestorCultures);
Esempio n. 5
0
 public static string GetAllStringsFromLocalizerToJson(IHtmlLocalizer htmlLocalizer)
 {
     return(htmlLocalizer.GetAllStrings()
            .ToDictionary(kv => kv.Name, kv => kv.Value)
            .ToCamelCasedJson());
 }