using Microsoft.Extensions.Localization; using Saxonite.Net.Core.Web.Base.App; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Saxonite.Net.Core.Web { // /// Dummy classes to group shared resources - named as per '.resx' file in root namespace. /// Required to create the IStringLocalizer instance using the type from the class. /// Name of the class is used as the prefix for localisation filenames. /// Resource files are in the Localization ResourcesPath in Startup.cs. /// public class SaxAdminProperties { } // Class must be in Root/Default Namespace to reference properties with same name. // NB 'Assembly name' must be the same as 'Default Namespace' until 'Root Namespace' can be set (.Net Core 2.1?). // Ref. Project Properties - Application. } namespace Saxonite.Net.Core.Web.Admin.App { //======================================================================= public class SaxLocaliser_Admin : SaxLocaliser { //------------------------------------------------------------------- // Data members. private readonly IStringLocalizer adminProperties; //------------------------------------------------------------------- /// /// Localisers are supplied using construction injection. /// public SaxLocaliser_Admin(IStringLocalizer webAppProperties) { this.adminProperties = webAppProperties; } //------------------------------------------------------------------- // Properties. public override IStringLocalizer MainProperties { get { return adminProperties; } } //------------------------------------------------------------------- } //======================================================================= }