Enterra.V8x1C.DOM.BaseObject.GetFromCache C# (CSharp) Method

GetFromCache() protected method

Get from cache
protected GetFromCache ( string name, GetValueHandler getValue ) : object
name string
getValue GetValueHandler
return object
        protected object GetFromCache(string name, GetValueHandler getValue)
        {
            object obj;
            if (_cache.TryGetValue(name, out obj))
            {
                return obj;
            }

            if (getValue != null)
            {
                obj = getValue.Invoke();

                _cache[name] = obj;
            }

            return obj;
        }