System.Net.Cache.SingleItemRequestCache.TryRetrieve C# (CSharp) Méthode

TryRetrieve() private méthode

private TryRetrieve ( string key, RequestCacheEntry &cacheEntry, Stream &readStream ) : bool
key string
cacheEntry RequestCacheEntry
readStream Stream
Résultat bool
        internal override bool TryRetrieve(string key, out RequestCacheEntry cacheEntry, out Stream readStream)
        {
            if (key == null)
                throw new ArgumentNullException("key");

            FrozenCacheEntry chkEntry = _Entry;
            cacheEntry = null;
            readStream = null;

            if (chkEntry == null || chkEntry.Key != key)
            {
                return false;
            }
            cacheEntry = FrozenCacheEntry.Create(chkEntry);
            readStream = new ReadOnlyStream(chkEntry.StreamBytes);
            return true;
        }