On Wed, 23 Feb 2005 10:36:40 +0100, Giuseppe Greco
[EMAIL PROTECTED] wrote:
On Tue, 2005-02-22 at 09:41 +0800, Troy Laurin wrote:
[DCL]
Would you suggest something like this?
sealed class ResourceUtils
{
private ResourceUtils() {}
public static readonly ResourceUtils Instance =
On Tue, 2005-02-22 at 09:41 +0800, Troy Laurin wrote:
[DCL]
On .NET the code above just works fine. What's important is to define
resourceManager as following:
private static volatile ResourceManager resourceManager;
Honestly, the only thing I forgot in the original source code was
I've been doing some more reading about .net internationalization
strategies and it looks like a common model is to have satellite dlls
for each assembly containing resources specifc to that assembly only and
to create a resource only assembly to put *all* shared resources into.
Maybe
Ian MacLean wrote:
Greco Giuseppe wrote:
Hi Ian,
I think it would be preferable to have a common
resource assembly (e.g. NAnt.Resources.dll).
you mean all resources for every assembly all in a single resources
assembly ? - I don't much like that idea at all. Resources should be
located
Hi Ian,
I think it would be preferable to have a common
resource assembly (e.g. NAnt.Resources.dll).
Letting an assembly access resources of another
assembly and viceversa is not that elegant. Moreover,
it would be difficult to maintain messages consistently.
There are also performance issues;
Greco Giuseppe wrote:
There are also performance issues; actually, the code
for getting a localized string is as following:
public static string GetString(string name, CultureInfo culture)
{
if (resourceManager == null) {
lock (typeof(ResourceUtils)) {
if (resourceManager == null) {