Example #1
0
        public static object GetObject(string name)
        {
            DynamicProjectSR sys = GetLoader();

            if (sys == null)
            {
                return(null);
            }
            return(sys._resources.GetObject(name, DynamicProjectSR.Culture));
        }
Example #2
0
        private static DynamicProjectSR GetLoader()
        {
            if (_loader == null)
            {
                lock (InternalSyncObject) {
                    if (_loader == null)
                    {
                        _loader = new DynamicProjectSR();
                    }
                }
            }

            return(_loader);
        }
Example #3
0
        public static string GetString(string name, params object[] args)
        {
            DynamicProjectSR sys = GetLoader();

            if (sys == null)
            {
                return(null);
            }
            string res = sys._resources.GetString(name, DynamicProjectSR.Culture);

            if (args != null && args.Length > 0)
            {
                return(String.Format(CultureInfo.CurrentCulture, res, args));
            }
            else
            {
                return(res);
            }
        }