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

Retrieve() private method

An opened cache entry be preserved until the stream is closed.
private Retrieve ( string key, RequestCacheEntry &cacheEntry ) : Stream
key string
cacheEntry RequestCacheEntry
return Stream
        internal override Stream Retrieve(string key, out RequestCacheEntry cacheEntry)
        {
            Stream result;
            if (!TryRetrieve(key, out cacheEntry, out result))
            {
                FileNotFoundException fileNotFoundException = new FileNotFoundException(null, key);
                throw new IOException(SR.GetString(SR.net_cache_retrieve_failure, fileNotFoundException.Message), fileNotFoundException);
            }

            return result;
        }