Aspectacular.ObjectCacheFacade.TryGet C# (CSharp) Метод

TryGet() публичный Метод

public TryGet ( string key, object &val, System.Proxy proxy ) : bool
key string
val object
proxy System.Proxy
Результат bool
        public virtual bool TryGet(string key, out object val, Proxy proxy)
        {
            // It really stinks that MS folks who designed ObjectCache didn't think of "bool TryGetValue(key, out val)" pattern
            // so this thing could be done in one search instead of two. Terrible!

            if(!this.objectCache.Contains(key, this.regionName))
            {
                val = null;
                return false;
            }

            val = this.objectCache.Get(key, this.regionName);
            return true;
        }