Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 private static TextRes GetLoader() {
     if (loader == null) {
         TextRes sr = new TextRes();
         Interlocked.CompareExchange(ref loader, sr, null);
     }
     return loader;
 }
Exemplo n.º 3
0
 private static TextRes GetLoader()
 {
     if (loader == null)
     {
         TextRes res = new TextRes();
         Interlocked.CompareExchange<TextRes>(ref loader, res, null);
     }
     return loader;
 }
Exemplo n.º 4
0
 private static TextRes GetLoader()
 {
     if (loader == null)
     {
         TextRes res = new TextRes();
         Interlocked.CompareExchange <TextRes>(ref loader, res, null);
     }
     return(loader);
 }
Exemplo n.º 5
0
 private static TextRes GetLoader()
 {
     if (loader == null)
     {
         TextRes sr = new TextRes();
         Interlocked.CompareExchange(ref loader, sr, null);
     }
     return(loader);
 }
Exemplo n.º 6
0
        public static object GetObject(string name)
        {
            TextRes sys = GetLoader();

            if (sys == null)
            {
                return(null);
            }
            return(sys.resources.GetObject(name, TextRes.Culture));
        }
Exemplo n.º 7
0
        public static string GetString(string name)
        {
            TextRes loader = GetLoader();

            if (loader == null)
            {
                return(null);
            }
            return(loader.resources.GetString(name, Culture));
        }
Exemplo n.º 8
0
        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));
        }
Exemplo n.º 9
0
 internal static string WellKnownText_UnknownTaggedText(object p0)
 {
     return(TextRes.GetString("WellKnownText_UnknownTaggedText", new object[] { p0 }));
 }
Exemplo n.º 10
0
 internal static string Validator_UnexpectedCall2(object p0, object p1, object p2)
 {
     return(TextRes.GetString("Validator_UnexpectedCall2", new object[] { p0, p1, p2 }));
 }
Exemplo n.º 11
0
 internal static string GeoJsonReader_MissingRequiredMember(object p0)
 {
     return(TextRes.GetString("GeoJsonReader_MissingRequiredMember", new object[] { p0 }));
 }
Exemplo n.º 12
0
 internal static string GmlReader_UnexpectedElement(object p0)
 {
     return(TextRes.GetString("GmlReader_UnexpectedElement", new object[] { p0 }));
 }
Exemplo n.º 13
0
 internal static string Validator_NestingOverflow(object p0)
 {
     return(TextRes.GetString("Validator_NestingOverflow", new object[] { p0 }));
 }
Exemplo n.º 14
0
 internal static string WellKnownText_UnexpectedCharacter(object p0)
 {
     return(TextRes.GetString("WellKnownText_UnexpectedCharacter", new object[] { p0 }));
 }
Exemplo n.º 15
0
 internal static string Validator_InvalidPointCoordinate(object p0, object p1, object p2, object p3)
 {
     return(TextRes.GetString("Validator_InvalidPointCoordinate", new object[] { p0, p1, p2, p3 }));
 }
Exemplo n.º 16
0
 internal static string GeoJsonReader_InvalidCrsName(object p0)
 {
     return(TextRes.GetString("GeoJsonReader_InvalidCrsName", new object[] { p0 }));
 }
Exemplo n.º 17
0
 internal static string GmlReader_InvalidAttribute(object p0, object p1)
 {
     return(TextRes.GetString("GmlReader_InvalidAttribute", new object[] { p0, p1 }));
 }
Exemplo n.º 18
0
 internal static string JsonReaderExtensions_CannotReadValueAsJsonObject(object p0)
 {
     return(TextRes.GetString("JsonReaderExtensions_CannotReadValueAsJsonObject", new object[] { p0 }));
 }
Exemplo n.º 19
0
 internal static string JsonReaderExtensions_CannotReadPropertyValueAsString(object p0, object p1)
 {
     return(TextRes.GetString("JsonReaderExtensions_CannotReadPropertyValueAsString", new object[] { p0, p1 }));
 }
Exemplo n.º 20
0
 internal static string InvalidPointCoordinate(object p0, object p1)
 {
     return(TextRes.GetString("InvalidPointCoordinate", new object[] { p0, p1 }));
 }
Exemplo n.º 21
0
 internal static string WellKnownText_UnexpectedToken(object p0, object p1, object p2)
 {
     return(TextRes.GetString("WellKnownText_UnexpectedToken", new object[] { p0, p1, p2 }));
 }
Exemplo n.º 22
0
 internal static string Validator_InvalidType(object p0)
 {
     return(TextRes.GetString("Validator_InvalidType", new object[] { p0 }));
 }
Exemplo n.º 23
0
 internal static string PriorityQueueDoesNotContainItem(object p0)
 {
     return(TextRes.GetString("PriorityQueueDoesNotContainItem", new object[] { p0 }));
 }
Exemplo n.º 24
0
 internal static string GmlReader_InvalidSpatialType(object p0)
 {
     return(TextRes.GetString("GmlReader_InvalidSpatialType", new object[] { p0 }));
 }
Exemplo n.º 25
0
 internal static string Validator_InvalidLongitudeCoordinate(object p0)
 {
     return(TextRes.GetString("Validator_InvalidLongitudeCoordinate", new object[] { p0 }));
 }
Exemplo n.º 26
0
 protected override string GetLocalizedString(string value)
 {
     return(TextRes.GetString(value));
 }