예제 #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);
            }
        }
예제 #2
0
 private static TextRes GetLoader() {
     if (loader == null) {
         TextRes sr = new TextRes();
         Interlocked.CompareExchange(ref loader, sr, null);
     }
     return loader;
 }
예제 #3
0
파일: TextRes.cs 프로젝트: nickchal/pash
 private static TextRes GetLoader()
 {
     if (loader == null)
     {
         TextRes res = new TextRes();
         Interlocked.CompareExchange<TextRes>(ref loader, res, null);
     }
     return loader;
 }
예제 #4
0
 private static TextRes GetLoader()
 {
     if (loader == null)
     {
         TextRes res = new TextRes();
         Interlocked.CompareExchange <TextRes>(ref loader, res, null);
     }
     return(loader);
 }
예제 #5
0
 private static TextRes GetLoader()
 {
     if (loader == null)
     {
         TextRes sr = new TextRes();
         Interlocked.CompareExchange(ref loader, sr, null);
     }
     return(loader);
 }
예제 #6
0
        public static object GetObject(string name)
        {
            TextRes sys = GetLoader();

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

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