public static string GetString(string name) { ConfigResources loader = GetLoader(); if (loader == null) { return(null); } return(loader.resources.GetString(name, Culture)); }
private static ConfigResources GetLoader() { if (loader == null) { lock (InternalSyncObject) { if (loader == null) { loader = new ConfigResources(); } } } return(loader); }
public static string GetString(string name, params object[] args) { ConfigResources 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)); }