private static StringsHelper GetLoader() { if (loader == null) { StringsHelper sr = new StringsHelper(); Interlocked.CompareExchange(ref loader, sr, null); } return(loader); }
public static string GetResourceString(string res) { StringsHelper sys = GetLoader(); if (sys == null) { return(null); } // If "res" is a resource id, temp will not be null, "res" will contain the retrieved resource string. // If "res" is not a resource id, temp will be null. string temp = sys.resources.GetString(res, StringsHelper.Culture); if (temp != null) { res = temp; } return(res); }