Пример #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 res = new TextRes();
         Interlocked.CompareExchange <TextRes>(ref loader, res, null);
     }
     return(loader);
 }
Пример #3
0
 private static TextRes GetLoader()
 {
     if (loader == null)
     {
         TextRes sr = new TextRes();
         Interlocked.CompareExchange(ref loader, sr, null);
     }
     return(loader);
 }
Пример #4
0
        public static object GetObject(string name)
        {
            TextRes sys = GetLoader();

            if (sys == null)
            {
                return(null);
            }
            return(sys.resources.GetObject(name, TextRes.Culture));
        }
Пример #5
0
        public static string GetString(string name)
        {
            TextRes loader = GetLoader();

            if (loader == null)
            {
                return(null);
            }
            return(loader.resources.GetString(name, Culture));
        }
Пример #6
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));
        }
Пример #7
0
 internal static string ALinq_ExpressionCannotEndWithTypeAs(object p0, object p1)
 {
     return(TextRes.GetString("ALinq_ExpressionCannotEndWithTypeAs", new object[] { p0, p1 }));
 }
Пример #8
0
 internal static string ALinq_ConstantNotSupported(object p0)
 {
     return(TextRes.GetString("ALinq_ConstantNotSupported", new object[] { p0 }));
 }
Пример #9
0
 internal static string ALinq_CouldNotConvert(object p0)
 {
     return(TextRes.GetString("ALinq_CouldNotConvert", new object[] { p0 }));
 }
Пример #10
0
 internal static string EpmTargetTree_DuplicateEpmAttrsWithSameTargetName(object p0, object p1, object p2, object p3)
 {
     return(TextRes.GetString("EpmTargetTree_DuplicateEpmAttrsWithSameTargetName", new object[] { p0, p1, p2, p3 }));
 }
Пример #11
0
 internal static string HttpProcessUtility_EncodingNotSupported(object p0)
 {
     return(TextRes.GetString("HttpProcessUtility_EncodingNotSupported", new object[] { p0 }));
 }
Пример #12
0
 internal static string ALinq_InvalidSourceForAnyAll(object p0)
 {
     return(TextRes.GetString("ALinq_InvalidSourceForAnyAll", new object[] { p0 }));
 }
Пример #13
0
 private static TextRes GetLoader()
 {
     if (loader == null)
     {
         TextRes res = new TextRes();
         Interlocked.CompareExchange<TextRes>(ref loader, res, null);
     }
     return loader;
 }
Пример #14
0
 internal static string Serializer_LoopsNotAllowedInNonPropertyComplexTypes(object p0)
 {
     return(TextRes.GetString("Serializer_LoopsNotAllowedInNonPropertyComplexTypes", new object[] { p0 }));
 }
Пример #15
0
 internal static string Serializer_NullCollectionParamterItemValue(object p0)
 {
     return(TextRes.GetString("Serializer_NullCollectionParamterItemValue", new object[] { p0 }));
 }
Пример #16
0
 internal static string ALinq_CollectionPropertyNotSupportedInWhere(object p0)
 {
     return(TextRes.GetString("ALinq_CollectionPropertyNotSupportedInWhere", new object[] { p0 }));
 }
Пример #17
0
 internal static string Serializer_InvalidParameterType(object p0, object p1)
 {
     return(TextRes.GetString("Serializer_InvalidParameterType", new object[] { p0, p1 }));
 }
Пример #18
0
 internal static string Serializer_InvalidCollectionParamterItemType(object p0, object p1)
 {
     return(TextRes.GetString("Serializer_InvalidCollectionParamterItemType", new object[] { p0, p1 }));
 }
Пример #19
0
 internal static string HttpProcessUtility_EscapeCharWithoutQuotes(object p0)
 {
     return(TextRes.GetString("HttpProcessUtility_EscapeCharWithoutQuotes", new object[] { p0 }));
 }
Пример #20
0
 internal static string HttpProcessUtility_EscapeCharAtEnd(object p0)
 {
     return(TextRes.GetString("HttpProcessUtility_EscapeCharAtEnd", new object[] { p0 }));
 }
Пример #21
0
 internal static string ALinq_ExpressionNotSupportedInProjectionToEntity(object p0, object p1)
 {
     return(TextRes.GetString("ALinq_ExpressionNotSupportedInProjectionToEntity", new object[] { p0, p1 }));
 }
Пример #22
0
 internal static string EpmTargetTree_InvalidTargetPath(object p0)
 {
     return(TextRes.GetString("EpmTargetTree_InvalidTargetPath", new object[] { p0 }));
 }
Пример #23
0
 internal static string ALinq_InvalidExpressionInNavigationPath(object p0)
 {
     return(TextRes.GetString("ALinq_InvalidExpressionInNavigationPath", new object[] { p0 }));
 }
Пример #24
0
 internal static string EpmTargetTree_AttributeInMiddle(object p0)
 {
     return(TextRes.GetString("EpmTargetTree_AttributeInMiddle", new object[] { p0 }));
 }
Пример #25
0
 internal static string ALinq_LinkPropertyNotSupportedInExpression(object p0)
 {
     return(TextRes.GetString("ALinq_LinkPropertyNotSupportedInExpression", new object[] { p0 }));
 }
Пример #26
0
 internal static string WebUtil_TypeMismatchInNonPropertyCollection(object p0)
 {
     return(TextRes.GetString("WebUtil_TypeMismatchInNonPropertyCollection", new object[] { p0 }));
 }
Пример #27
0
 private static TextRes GetLoader() {
     if (loader == null) {
         TextRes sr = new TextRes();
         Interlocked.CompareExchange(ref loader, sr, null);
     }
     return loader;
 }
Пример #28
0
 internal static string ALinq_AnyAllNotSupportedInOrderBy(object p0)
 {
     return(TextRes.GetString("ALinq_AnyAllNotSupportedInOrderBy", new object[] { p0 }));
 }
Пример #29
0
 internal static string Serializer_UriDoesNotContainParameterAlias(object p0)
 {
     return(TextRes.GetString("Serializer_UriDoesNotContainParameterAlias", new object[] { p0 }));
 }
Пример #30
0
 internal static string HttpProcessUtility_ClosingQuoteNotFound(object p0)
 {
     return(TextRes.GetString("HttpProcessUtility_ClosingQuoteNotFound", new object[] { p0 }));
 }
Пример #31
0
 protected override string GetLocalizedString(string value)
 {
     return(TextRes.GetString(value));
 }
Пример #32
0
 internal static string WebUtil_CollectionTypeNotSupportedInV2OrBelow(object p0)
 {
     return(TextRes.GetString("WebUtil_CollectionTypeNotSupportedInV2OrBelow", new object[] { p0 }));
 }