예제 #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
파일: TextRes.cs 프로젝트: nickchal/pash
 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 }));
 }