Esempio n. 1
0
 public static string GetString(string name)
 {
     System.Configuration.SR loader = GetLoader();
     if (loader == null)
     {
         return(null);
     }
     return(loader.resources.GetString(name, Culture));
 }
Esempio n. 2
0
 private static System.Configuration.SR GetLoader()
 {
     if (loader == null)
     {
         System.Configuration.SR sr = new System.Configuration.SR();
         Interlocked.CompareExchange <System.Configuration.SR>(ref loader, sr, null);
     }
     return(loader);
 }
Esempio n. 3
0
        public static string GetString(string name, params object[] args)
        {
            System.Configuration.SR 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));
        }
 private static System.Configuration.SR GetLoader()
 {
     if (loader == null)
     {
         System.Configuration.SR sr = new System.Configuration.SR();
         Interlocked.CompareExchange<System.Configuration.SR>(ref loader, sr, null);
     }
     return loader;
 }