예제 #1
0
        public static string GetString(string name)
        {
            ConfigResources loader = GetLoader();

            if (loader == null)
            {
                return(null);
            }
            return(loader.resources.GetString(name, Culture));
        }
예제 #2
0
 private static ConfigResources GetLoader()
 {
     if (loader == null)
     {
         lock (InternalSyncObject)
         {
             if (loader == null)
             {
                 loader = new ConfigResources();
             }
         }
     }
     return(loader);
 }
예제 #3
0
        public static string GetString(string name, params object[] args)
        {
            ConfigResources 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));
        }