public static string GetString(string name, object[] args) { SR loader = SR.GetLoader(); if (loader != null) { string str = loader.resources.GetString(name, SR.Culture); if (args == null || (int)args.Length <= 0) { return(str); } else { for (int i = 0; i < (int)args.Length; i++) { string str1 = args[i] as string; if (str1 != null && str1.Length > 0x400) { args[i] = string.Concat(str1.Substring(0, 0x3fd), "..."); } } return(string.Format(CultureInfo.CurrentCulture, str, args)); } } else { return(null); } }
public static string GetString(string name) { SR loader = SR.GetLoader(); if (loader != null) { return(loader.resources.GetString(name, SR.Culture)); } else { return(null); } }
public static string GetString(string name, params object[] args) { SR loader = SR.GetLoader(); if (loader == null) { return((string)null); } string format = loader.resources.GetString(name, SR.Culture); if (args == null || args.Length == 0) { return(format); } for (int index = 0; index < args.Length; ++index) { if (args[index] is string str && str.Length > 1024) { args[index] = (object)(str.Substring(0, 1021) + "..."); } } return(string.Format((IFormatProvider)CultureInfo.CurrentCulture, format, args)); }
public static object GetObject(string name) { return(SR.GetLoader()?.resources.GetObject(name, SR.Culture)); }
public static string GetString(string name) { return(SR.GetLoader()?.resources.GetString(name, SR.Culture)); }