private static SRHelper GetLoader() { if (loader == null) { SRHelper sr = new SRHelper(); Interlocked.CompareExchange(ref loader, sr, null); } return(loader); }
public static string GetResourceString(string res) { SRHelper 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, SRHelper.Culture); if (temp != null) { res = temp; } return(res); }