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

TryUpdate() private method

private TryUpdate ( string key, System.DateTime expiresUtc, System.DateTime lastModifiedUtc, System.DateTime lastSynchronizedUtc, System.TimeSpan maxStale, StringCollection entryMetadata, StringCollection systemMetadata ) : bool
key string
expiresUtc System.DateTime
lastModifiedUtc System.DateTime
lastSynchronizedUtc System.DateTime
maxStale System.TimeSpan
entryMetadata System.Collections.Specialized.StringCollection
systemMetadata System.Collections.Specialized.StringCollection
return bool
        internal override bool TryUpdate(string key, DateTime expiresUtc, DateTime lastModifiedUtc, DateTime lastSynchronizedUtc, TimeSpan maxStale, StringCollection entryMetadata, StringCollection systemMetadata)
        {
            if (key == null)
                throw new ArgumentNullException("key");

            FrozenCacheEntry chkEntry = FrozenCacheEntry.Create(_Entry);

            //
            // This class does not forward metadata updates to WinInet to simplify the design and avoid interlocked ops
            //

            if (chkEntry == null || chkEntry.Key != key)
                return true;

            chkEntry.ExpiresUtc = expiresUtc;
            chkEntry.LastModifiedUtc = lastModifiedUtc;
            chkEntry.LastSynchronizedUtc = lastSynchronizedUtc;
            chkEntry.MaxStale = maxStale;
            chkEntry.EntryMetadata = entryMetadata;
            chkEntry.SystemMetadata = systemMetadata;
            _Entry = chkEntry;
            return true;
        }
        //