using ResourceString.Net.Contract; using System; using System.Globalization; using System.Resources; using System.Threading; namespace ResourceString.Net.Logic.Properties { internal static class Resources { #region ResourceManager private static readonly Type _Type = typeof(Resources); private static readonly Lazy _ResourceManager = new Lazy( () => new ResourceManager("ResourceString.Net.Logic.Properties.Resources" ?? string.Empty, _Type.Assembly), LazyThreadSafetyMode.PublicationOnly ); public static ResourceManager ResourceManager => _ResourceManager.Value; #endregion // ResourceManager internal static class ResourceStringMembers { private static readonly Lazy LazyFormat = new Lazy( () => new ResourceManagerString("ResourceStringMembers", ResourceManager, CultureInfo.CurrentCulture), LazyThreadSafetyMode.PublicationOnly ); public static IResourceString Format => LazyFormat.Value; public static IResourceString From(IResourceString resourceId, IResourceString resourceManagerPropertyName) => new FormattedResourceString( Format, resourceId, resourceManagerPropertyName ); } internal static class ResourceFormatClassMembers { private static readonly Lazy LazyFormat = new Lazy( () => new ResourceManagerString("ResourceFormatClassMembers", ResourceManager, CultureInfo.CurrentCulture), LazyThreadSafetyMode.PublicationOnly ); public static IResourceString Format => LazyFormat.Value; public static IResourceString From(IResourceString resourceId, IResourceString resourceManagerPropertyName, IResourceString fromMethodDefinition) => new FormattedResourceString( Format, resourceId, resourceManagerPropertyName, fromMethodDefinition ); } internal static class ResourceFormatClassFromMethod { private static readonly Lazy LazyFormat = new Lazy( () => new ResourceManagerString("ResourceFormatClassFromMethod", ResourceManager, CultureInfo.CurrentCulture), LazyThreadSafetyMode.PublicationOnly ); public static IResourceString Format => LazyFormat.Value; public static IResourceString From(IResourceString fromMethodSignature, IResourceString parameterNames) => new FormattedResourceString( Format, fromMethodSignature, parameterNames ); } internal static class ResourcesClassTemplate { private static readonly Lazy LazyFormat = new Lazy( () => new ResourceManagerString("ResourcesClassTemplate", ResourceManager, CultureInfo.CurrentCulture), LazyThreadSafetyMode.PublicationOnly ); public static IResourceString Format => LazyFormat.Value; public static IResourceString From(IResourceString ns, IResourceString className, IResourceString resourceManagerRegion, IResourceString resourceRegions) => new FormattedResourceString( Format, ns, className, resourceManagerRegion, resourceRegions ); } internal static class ResourceManagerMemberTemplate { private static readonly Lazy LazyFormat = new Lazy( () => new ResourceManagerString("ResourceManagerMemberTemplate", ResourceManager, CultureInfo.CurrentCulture), LazyThreadSafetyMode.PublicationOnly ); public static IResourceString Format => LazyFormat.Value; public static IResourceString From(IResourceString className, IResourceString resourceManagerTypeName) => new FormattedResourceString( Format, className, resourceManagerTypeName ); } #region DefaultPropertyName_ResourceManager private static readonly Lazy LazyDefaultPropertyName_ResourceManager = new Lazy( () => new ResourceManagerString("DefaultPropertyName_ResourceManager", ResourceManager, CultureInfo.CurrentCulture), LazyThreadSafetyMode.PublicationOnly ); public static IResourceString DefaultPropertyName_ResourceManager => LazyDefaultPropertyName_ResourceManager.Value; #endregion // DefaultPropertyName_ResourceManager } }