System.Net.Cache.SingleItemRequestCache.TryRetrieve C# (CSharp) Method

TryRetrieve() private method

private TryRetrieve ( string key, RequestCacheEntry &cacheEntry, Stream &readStream ) : bool
key string
cacheEntry RequestCacheEntry
readStream Stream
return 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;
        }