public static string GetString(string name, params object[] args) { TextRes sys = GetLoader(); if (sys == null) { return(null); } string res = sys.resources.GetString(name, TextRes.Culture); if (args != null && args.Length > 0) { for (int i = 0; i < args.Length; i++) { String value = args[i] as String; if (value != null && value.Length > 1024) { args[i] = value.Substring(0, 1024 - 3) + "..."; } } return(String.Format(CultureInfo.CurrentCulture, res, args)); } else { return(res); } }
private static TextRes GetLoader() { if (loader == null) { TextRes sr = new TextRes(); Interlocked.CompareExchange(ref loader, sr, null); } return loader; }
private static TextRes GetLoader() { if (loader == null) { TextRes res = new TextRes(); Interlocked.CompareExchange<TextRes>(ref loader, res, null); } return loader; }
private static TextRes GetLoader() { if (loader == null) { TextRes res = new TextRes(); Interlocked.CompareExchange <TextRes>(ref loader, res, null); } return(loader); }
private static TextRes GetLoader() { if (loader == null) { TextRes sr = new TextRes(); Interlocked.CompareExchange(ref loader, sr, null); } return(loader); }
public static object GetObject(string name) { TextRes sys = GetLoader(); if (sys == null) { return(null); } return(sys.resources.GetObject(name, TextRes.Culture)); }
public static string GetString(string name) { TextRes loader = GetLoader(); if (loader == null) { return(null); } return(loader.resources.GetString(name, Culture)); }
public static string GetString(string name, params object[] args) { TextRes 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)); }
internal static string WellKnownText_UnknownTaggedText(object p0) { return(TextRes.GetString("WellKnownText_UnknownTaggedText", new object[] { p0 })); }
internal static string Validator_UnexpectedCall2(object p0, object p1, object p2) { return(TextRes.GetString("Validator_UnexpectedCall2", new object[] { p0, p1, p2 })); }
internal static string GeoJsonReader_MissingRequiredMember(object p0) { return(TextRes.GetString("GeoJsonReader_MissingRequiredMember", new object[] { p0 })); }
internal static string GmlReader_UnexpectedElement(object p0) { return(TextRes.GetString("GmlReader_UnexpectedElement", new object[] { p0 })); }
internal static string Validator_NestingOverflow(object p0) { return(TextRes.GetString("Validator_NestingOverflow", new object[] { p0 })); }
internal static string WellKnownText_UnexpectedCharacter(object p0) { return(TextRes.GetString("WellKnownText_UnexpectedCharacter", new object[] { p0 })); }
internal static string Validator_InvalidPointCoordinate(object p0, object p1, object p2, object p3) { return(TextRes.GetString("Validator_InvalidPointCoordinate", new object[] { p0, p1, p2, p3 })); }
internal static string GeoJsonReader_InvalidCrsName(object p0) { return(TextRes.GetString("GeoJsonReader_InvalidCrsName", new object[] { p0 })); }
internal static string GmlReader_InvalidAttribute(object p0, object p1) { return(TextRes.GetString("GmlReader_InvalidAttribute", new object[] { p0, p1 })); }
internal static string JsonReaderExtensions_CannotReadValueAsJsonObject(object p0) { return(TextRes.GetString("JsonReaderExtensions_CannotReadValueAsJsonObject", new object[] { p0 })); }
internal static string JsonReaderExtensions_CannotReadPropertyValueAsString(object p0, object p1) { return(TextRes.GetString("JsonReaderExtensions_CannotReadPropertyValueAsString", new object[] { p0, p1 })); }
internal static string InvalidPointCoordinate(object p0, object p1) { return(TextRes.GetString("InvalidPointCoordinate", new object[] { p0, p1 })); }
internal static string WellKnownText_UnexpectedToken(object p0, object p1, object p2) { return(TextRes.GetString("WellKnownText_UnexpectedToken", new object[] { p0, p1, p2 })); }
internal static string Validator_InvalidType(object p0) { return(TextRes.GetString("Validator_InvalidType", new object[] { p0 })); }
internal static string PriorityQueueDoesNotContainItem(object p0) { return(TextRes.GetString("PriorityQueueDoesNotContainItem", new object[] { p0 })); }
internal static string GmlReader_InvalidSpatialType(object p0) { return(TextRes.GetString("GmlReader_InvalidSpatialType", new object[] { p0 })); }
internal static string Validator_InvalidLongitudeCoordinate(object p0) { return(TextRes.GetString("Validator_InvalidLongitudeCoordinate", new object[] { p0 })); }
protected override string GetLocalizedString(string value) { return(TextRes.GetString(value)); }