add draft
This commit is contained in:
67
ResourceString.Net.Logic/Properties/Resources.cs
Normal file
67
ResourceString.Net.Logic/Properties/Resources.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
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> _ResourceManager = new Lazy<ResourceManager>(
|
||||
() => new ResourceManager(_Type.FullName, _Type.Assembly),
|
||||
LazyThreadSafetyMode.PublicationOnly
|
||||
);
|
||||
|
||||
public static ResourceManager ResourceManager => _ResourceManager.Value;
|
||||
|
||||
#endregion // ResourceManager
|
||||
|
||||
#region ResourceStringMembers
|
||||
|
||||
private static readonly Lazy<IResourceString> LazyResourceStringMembers = new Lazy<IResourceString>(
|
||||
() => new ResourceManagerString("ResourceStringMembers", ResourceManager, CultureInfo.CurrentCulture),
|
||||
LazyThreadSafetyMode.PublicationOnly
|
||||
);
|
||||
|
||||
public static IResourceString ResourceStringMembers => LazyResourceStringMembers.Value;
|
||||
|
||||
#endregion // ResourceStringMembers
|
||||
|
||||
#region ResourceManagerMemberTemplate
|
||||
|
||||
private static readonly Lazy<IResourceString> LazyResourceManagerMemberTemplate = new Lazy<IResourceString>(
|
||||
() => new ResourceManagerString("ResourceManagerMemberTemplate", ResourceManager, CultureInfo.CurrentCulture),
|
||||
LazyThreadSafetyMode.PublicationOnly
|
||||
);
|
||||
|
||||
public static IResourceString ResourceManagerMemberTemplate => LazyResourceManagerMemberTemplate.Value;
|
||||
|
||||
#endregion // ResourceManagerMemberTemplate
|
||||
|
||||
#region ResourcesClassTemplate
|
||||
|
||||
private static readonly Lazy<IResourceString> LazyResourcesClassTemplate = new Lazy<IResourceString>(
|
||||
() => new ResourceManagerString("ResourcesClassTemplate", ResourceManager, CultureInfo.CurrentCulture),
|
||||
LazyThreadSafetyMode.PublicationOnly
|
||||
);
|
||||
|
||||
public static IResourceString ResourcesClassTemplate => LazyResourcesClassTemplate.Value;
|
||||
|
||||
#endregion // ResourcesClassTemplate
|
||||
|
||||
#region DefaultPropertyName_ResourceManager
|
||||
|
||||
private static readonly Lazy<IResourceString> LazyDefaultPropertyName_ResourceManager = new Lazy<IResourceString>(
|
||||
() => new ResourceManagerString("DefaultPropertyName_ResourceManager", ResourceManager, CultureInfo.CurrentCulture),
|
||||
LazyThreadSafetyMode.PublicationOnly
|
||||
);
|
||||
|
||||
public static IResourceString DefaultPropertyName_ResourceManager => LazyDefaultPropertyName_ResourceManager.Value;
|
||||
|
||||
#endregion // DefaultPropertyName_ResourceManager
|
||||
}
|
||||
}
|
||||
54
ResourceString.Net.Logic/Properties/Resources.resx
Normal file
54
ResourceString.Net.Logic/Properties/Resources.resx
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<data name="ResourceStringMembers" xml:space="preserve">
|
||||
<value>
|
||||
#region {0}
|
||||
|
||||
private static readonly Lazy<IResourceString> Lazy{0} = new Lazy<IResourceString>(
|
||||
() => new ResourceManagerString("{0}", {1}, CultureInfo.CurrentCulture),
|
||||
LazyThreadSafetyMode.PublicationOnly
|
||||
);
|
||||
|
||||
public static IResourceString {0} => Lazy{0}.Value;
|
||||
|
||||
#endregion // {0}
|
||||
</value>
|
||||
</data>
|
||||
<data name="ResourcesClassTemplate" xml:space="preserve">
|
||||
<value>
|
||||
using ResourceString.Net.Contract;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Resources;
|
||||
using System.Threading;
|
||||
|
||||
namespace {0}
|
||||
{{
|
||||
internal static class {1}
|
||||
{{
|
||||
{2}
|
||||
{3}
|
||||
}}
|
||||
}}
|
||||
</value>
|
||||
</data>
|
||||
<data name="ResourceManagerMemberTemplate" xml:space="preserve">
|
||||
<value>
|
||||
#region ResourceManager
|
||||
|
||||
private static readonly Type _Type = typeof({0});
|
||||
|
||||
private static readonly Lazy<ResourceManager> _ResourceManager = new Lazy<ResourceManager>(
|
||||
() => new ResourceManager(_Type.FullName, _Type.Assembly),
|
||||
LazyThreadSafetyMode.PublicationOnly
|
||||
);
|
||||
|
||||
public static ResourceManager ResourceManager => _ResourceManager.Value;
|
||||
|
||||
#endregion // ResourceManager
|
||||
</value>
|
||||
</data>
|
||||
<data name="DefaultPropertyName_ResourceManager">
|
||||
<value>ResourceManager</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user