Пример #1
0
            private IDictionary GetResourceCache(string cultureName)
            {
                object cultureNeutralKey;

                if (cultureName == null)
                {
                    cultureNeutralKey = SqlResourceProviderFactory.SqlResourceProvider.CultureNeutralKey;
                }
                else
                {
                    cultureNeutralKey = cultureName;
                }
                if (this._resourceCache == null)
                {
                    this._resourceCache = new ListDictionary();
                }
                IDictionary item = this._resourceCache[cultureNeutralKey] as IDictionary;

                if (item == null)
                {
                    item = SqlResourceHelper.GetResources(this._virtualPath, this._className, cultureName, null);
                    this._resourceCache[cultureNeutralKey] = item;
                }
                return(item);
            }
Пример #2
0
        private IDictionary GetResourceCache(string cultureName)
        {
            string cultureNeutralKey = cultureName == null?DefaultDesignCulture() : cultureName;

            IDictionary item = ResourceCache[cultureNeutralKey] as IDictionary;

            if (item == null)
            {
                item = SqlResourceHelper.GetResources(GetVirtualPath(_provider), null, cultureNeutralKey, _provider);
                ResourceCache[cultureNeutralKey] = item;
            }
            return(item);
        }