public static string GetString(string name) { System.Configuration.SR loader = GetLoader(); if (loader == null) { return(null); } return(loader.resources.GetString(name, Culture)); }
private static System.Configuration.SR GetLoader() { if (loader == null) { System.Configuration.SR sr = new System.Configuration.SR(); Interlocked.CompareExchange <System.Configuration.SR>(ref loader, sr, null); } return(loader); }
public static string GetString(string name, params object[] args) { System.Configuration.SR loader = GetLoader(); if (loader == null) { return(null); } string format = loader.resources.GetString(name, Culture); if ((args == null) || (args.Length <= 0)) { return(format); } for (int i = 0; i < args.Length; i++) { string str2 = args[i] as string; if ((str2 != null) && (str2.Length > 0x400)) { args[i] = str2.Substring(0, 0x3fd) + "..."; } } return(string.Format(CultureInfo.CurrentCulture, format, args)); }
private static System.Configuration.SR GetLoader() { if (loader == null) { System.Configuration.SR sr = new System.Configuration.SR(); Interlocked.CompareExchange<System.Configuration.SR>(ref loader, sr, null); } return loader; }