Beispiel #1
0
 protected object GetLocalResourceObject(string resourceKey, Type objType, string propName)
 {
     if (this._resourceProvider == null)
     {
         this._resourceProvider = ResourceExpressionBuilder.GetLocalResourceProvider(this);
     }
     return(ResourceExpressionBuilder.GetResourceObject(this._resourceProvider, resourceKey, null, objType, propName));
 }
Beispiel #2
0
        /// <devdoc>
        /// Return a Page-level resource object
        /// </devdoc>
        protected object GetLocalResourceObject(string resourceKey)
        {
            // Cache the resource provider in the template control, so that if a Page needs to call
            // this multiple times, we don't need to call ResourceExpressionBuilder.GetLocalResourceProvider
            // every time.
            if (_resourceProvider == null)
            {
                _resourceProvider = ResourceExpressionBuilder.GetLocalResourceProvider(this);
            }

            return(ResourceExpressionBuilder.GetResourceObject(_resourceProvider, resourceKey, null /*culture*/));
        }