fix resource class name generation -> 0.0.3
This commit is contained in:
@@ -12,18 +12,18 @@ namespace ResourceString.Net.Logic.Properties
|
||||
#region ResourceManager
|
||||
|
||||
private static readonly Type _Type = typeof(Resources);
|
||||
|
||||
|
||||
private static readonly Lazy<ResourceManager> _ResourceManager = new Lazy<ResourceManager>(
|
||||
() => new ResourceManager(_Type.FullName ?? string.Empty, _Type.Assembly),
|
||||
() => 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
|
||||
|
||||
internal static class ResourceStringMembers
|
||||
{
|
||||
private static readonly Lazy<IResourceString> LazyFormat = new Lazy<IResourceString>(
|
||||
() => new ResourceManagerString("ResourceStringMembers", ResourceManager, CultureInfo.CurrentCulture),
|
||||
@@ -31,16 +31,16 @@ namespace ResourceString.Net.Logic.Properties
|
||||
);
|
||||
|
||||
public static IResourceString Format => LazyFormat.Value;
|
||||
|
||||
|
||||
public static IResourceString From(IResourceString resourceId, IResourceString resourceManagerPropertyName) => new FormattedResourceString(
|
||||
Format,
|
||||
Format,
|
||||
resourceId,
|
||||
resourceManagerPropertyName
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
internal static class ResourceFormatClassMembers
|
||||
|
||||
}
|
||||
|
||||
internal static class ResourceFormatClassMembers
|
||||
{
|
||||
private static readonly Lazy<IResourceString> LazyFormat = new Lazy<IResourceString>(
|
||||
() => new ResourceManagerString("ResourceFormatClassMembers", ResourceManager, CultureInfo.CurrentCulture),
|
||||
@@ -48,17 +48,17 @@ namespace ResourceString.Net.Logic.Properties
|
||||
);
|
||||
|
||||
public static IResourceString Format => LazyFormat.Value;
|
||||
|
||||
|
||||
public static IResourceString From(IResourceString resourceId, IResourceString resourceManagerPropertyName, IResourceString fromMethodDefinition) => new FormattedResourceString(
|
||||
Format,
|
||||
Format,
|
||||
resourceId,
|
||||
resourceManagerPropertyName,
|
||||
fromMethodDefinition
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
internal static class ResourceFormatClassFromMethod
|
||||
|
||||
}
|
||||
|
||||
internal static class ResourceFormatClassFromMethod
|
||||
{
|
||||
private static readonly Lazy<IResourceString> LazyFormat = new Lazy<IResourceString>(
|
||||
() => new ResourceManagerString("ResourceFormatClassFromMethod", ResourceManager, CultureInfo.CurrentCulture),
|
||||
@@ -66,16 +66,16 @@ namespace ResourceString.Net.Logic.Properties
|
||||
);
|
||||
|
||||
public static IResourceString Format => LazyFormat.Value;
|
||||
|
||||
|
||||
public static IResourceString From(IResourceString fromMethodSignature, IResourceString parameterNames) => new FormattedResourceString(
|
||||
Format,
|
||||
Format,
|
||||
fromMethodSignature,
|
||||
parameterNames
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
internal static class ResourcesClassTemplate
|
||||
|
||||
}
|
||||
|
||||
internal static class ResourcesClassTemplate
|
||||
{
|
||||
private static readonly Lazy<IResourceString> LazyFormat = new Lazy<IResourceString>(
|
||||
() => new ResourceManagerString("ResourcesClassTemplate", ResourceManager, CultureInfo.CurrentCulture),
|
||||
@@ -83,18 +83,18 @@ namespace ResourceString.Net.Logic.Properties
|
||||
);
|
||||
|
||||
public static IResourceString Format => LazyFormat.Value;
|
||||
|
||||
|
||||
public static IResourceString From(IResourceString ns, IResourceString className, IResourceString resourceManagerRegion, IResourceString resourceRegions) => new FormattedResourceString(
|
||||
Format,
|
||||
Format,
|
||||
ns,
|
||||
className,
|
||||
resourceManagerRegion,
|
||||
resourceRegions
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
internal static class ResourceManagerMemberTemplate
|
||||
|
||||
}
|
||||
|
||||
internal static class ResourceManagerMemberTemplate
|
||||
{
|
||||
private static readonly Lazy<IResourceString> LazyFormat = new Lazy<IResourceString>(
|
||||
() => new ResourceManagerString("ResourceManagerMemberTemplate", ResourceManager, CultureInfo.CurrentCulture),
|
||||
@@ -102,14 +102,15 @@ namespace ResourceString.Net.Logic.Properties
|
||||
);
|
||||
|
||||
public static IResourceString Format => LazyFormat.Value;
|
||||
|
||||
public static IResourceString From(IResourceString resourceManagerTypeName) => new FormattedResourceString(
|
||||
Format,
|
||||
|
||||
public static IResourceString From(IResourceString className, IResourceString resourceManagerTypeName) => new FormattedResourceString(
|
||||
Format,
|
||||
className,
|
||||
resourceManagerTypeName
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#region DefaultPropertyName_ResourceManager
|
||||
|
||||
private static readonly Lazy<IResourceString> LazyDefaultPropertyName_ResourceManager = new Lazy<IResourceString>(
|
||||
@@ -120,6 +121,6 @@ namespace ResourceString.Net.Logic.Properties
|
||||
public static IResourceString DefaultPropertyName_ResourceManager => LazyDefaultPropertyName_ResourceManager.Value;
|
||||
|
||||
#endregion // DefaultPropertyName_ResourceManager
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,10 +62,10 @@ namespace {0}
|
||||
<value>
|
||||
#region ResourceManager
|
||||
|
||||
private static readonly Type _Type = typeof({0});
|
||||
private static readonly Type _Type = typeof({1});
|
||||
|
||||
private static readonly Lazy<ResourceManager> _ResourceManager = new Lazy<ResourceManager>(
|
||||
() => new ResourceManager(_Type.FullName ?? string.Empty, _Type.Assembly),
|
||||
() => new ResourceManager("{0}" ?? string.Empty, _Type.Assembly),
|
||||
LazyThreadSafetyMode.PublicationOnly
|
||||
);
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace {0}
|
||||
|
||||
#endregion // ResourceManager
|
||||
</value>
|
||||
<comment>0 = ResourceManagerTypeName</comment>
|
||||
<comment>0 = ResourceManagerTypeName, 1 = ClassName</comment>
|
||||
</data>
|
||||
<data name="DefaultPropertyName_ResourceManager">
|
||||
<value>ResourceManager</value>
|
||||
|
||||
Reference in New Issue
Block a user