using System;
using System.Collections.Generic;
using Microsoft.Extensions.Localization;

namespace TestApp
{
	class Program
	{
		static void Main(string[] args)
		{
			TestApp.Resources.ResourcesServiceCollectionInstaller.AddGeneratedResourceWrappers(null);
			var x = new TestApp.Resources.BankAccountLocalizer(null).String1;
			var y = new TestApp.Resources.Test.JiriLocalizer(null).String1;
			var z = new TestApp.Resources.TestLocalizer(null);
		}
	}
}



























































namespace Havit.Blazor.Components.Web.Infrastructure
{
	/// <summary>
	/// Base-class for delegating IStringLocalizer implementations.
	/// To be used for implementation of strong-API localizers.
	/// </summary>
	public abstract class DelegatingStringLocalizer<T> : IStringLocalizer<T> // TODO separate Havit.Extensions.Localization package? (if to be used outside Blazor stack)
	{
		protected readonly IStringLocalizer<T> InnerLocalizer;

		protected DelegatingStringLocalizer(IStringLocalizer<T> innerLocalizer)
		{
			this.InnerLocalizer = innerLocalizer;
		}

		/// <inheritdoc/>
		public virtual LocalizedString this[string name] => InnerLocalizer[name];
		/// <inheritdoc/>
		public virtual LocalizedString this[string name, params object[] arguments] => InnerLocalizer[name, arguments];
		/// <inheritdoc/>
		public virtual IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures = false) => InnerLocalizer.GetAllStrings(includeParentCultures);
	}
}
