1 write to _Validator
System (1)
net\System\Net\Cache\_RequestCacheProtocol.cs (1)
72_Validator = defaultValidator;
127 references to _Validator
System (127)
net\System\Net\Cache\_RequestCacheProtocol.cs (127)
59internal RequestCacheValidator Validator {get {return _Validator;}} 60internal bool IsCacheFresh {get {return _Validator != null && _Validator.CacheFreshnessStatus == CacheFreshnessStatus.Fresh;}} 104if (_RequestCache == null || _Validator == null) 110_Validator.FetchRequest(cacheUri, request); 127_ProtocolException = new InvalidOperationException(SR.GetString(SR.net_cache_validator_result, "ValidateRequest", _Validator.ValidationStatus.ToString())); 128if(Logging.On) Logging.PrintError(Logging.RequestCache, SR.GetString(SR.net_log_cache_unexpected_status, "ValidateRequest()", _Validator.ValidationStatus.ToString())); 173if(Logging.On) Logging.Enter(Logging.RequestCache, this, "GetRevalidateStatus", (_Validator == null? null: _Validator.Request)); 175_Validator.FetchResponse(response); 205if (_Validator.Response == null) 206_Validator.FetchResponse(response); 210EnsureCacheRemoval(_Validator.CacheKey); 258if(Logging.On) Logging.PrintWarning(Logging.RequestCache, SR.GetString(SR.net_log_cache_closing_cache_stream, "CacheProtocol#" + this.GetHashCode().ToString(NumberFormatInfo.InvariantInfo), "Abort()", stream.GetType().FullName, _Validator.CacheKey)); 292if (_Validator.CacheStream != null && _Validator.CacheStream != Stream.Null) 295_Validator.CacheStream.Close(); 296_Validator.CacheStream = Stream.Null; 299if (_Validator.StrictCacheErrors) 301_Validator.CacheStream = _RequestCache.Retrieve(_Validator.CacheKey, out cacheEntry); 306_RequestCache.TryRetrieve(_Validator.CacheKey, out cacheEntry, out stream); 307_Validator.CacheStream = stream; 314_Validator.FetchCacheEntry(cacheEntry); 317if (_Validator.CacheStream == null) 321_Validator.CacheStream = Stream.Null; 332if (_Validator.CacheStream == null || _Validator.CacheStream == Stream.Null) 336_ProtocolException = new InvalidOperationException(SR.GetString(SR.net_cache_no_stream, _Validator.CacheKey)); 341Stream stream = _Validator.CacheStream; 343_RequestCache.UnlockEntry(_Validator.CacheStream); 345if (_Validator.CacheStreamOffset != 0L || _Validator.CacheStreamLength != _Validator.CacheEntry.StreamSize) 347stream = new RangeStream(stream, _Validator.CacheStreamOffset, _Validator.CacheStreamLength); 348if(Logging.On) Logging.PrintInfo(Logging.RequestCache, SR.GetString(SR.net_log_cache_returned_range_cache, "ValidateCache()", _Validator.CacheStreamOffset, _Validator.CacheStreamLength)); 351_ResponseStreamLength = _Validator.CacheStreamLength; 356_ResponseStream = _Validator.CacheStream; 373_ProtocolException = new InvalidOperationException(SR.GetString(SR.net_cache_validator_result, "ValidateCache", _Validator.ValidationStatus.ToString())); 374if(Logging.On) Logging.PrintError(Logging.RequestCache, SR.GetString(SR.net_log_cache_unexpected_status, "ValidateCache()", _Validator.ValidationStatus.ToString())); 390if (_ResponseStream == null && _Validator.CacheStream != null && _Validator.CacheStream != Stream.Null) 392_Validator.CacheStream.Close(); 393_Validator.CacheStream = Stream.Null; 428_ProtocolException = new InvalidOperationException(SR.GetString(SR.net_cache_validator_result, "ValidateResponse", _Validator.ValidationStatus.ToString())); 429if(Logging.On) Logging.PrintError(Logging.RequestCache, SR.GetString(SR.net_log_cache_unexpected_status, "ValidateResponse()", _Validator.ValidationStatus.ToString())); 449_Validator.CacheStream = Stream.Null; 477if (_Validator.CacheStream == null || _Validator.CacheStream == Stream.Null) 480_ProtocolException = new InvalidOperationException(SR.GetString(SR.net_cache_no_stream, _Validator.CacheKey)); 485Stream stream = _Validator.CacheStream; 487if (_Validator.CacheStreamOffset != 0L || _Validator.CacheStreamLength != _Validator.CacheEntry.StreamSize) 489stream = new RangeStream(stream, _Validator.CacheStreamOffset, _Validator.CacheStreamLength); 490if(Logging.On) Logging.PrintInfo(Logging.RequestCache, SR.GetString(SR.net_log_cache_returned_range_cache, "RevalidateCache()", _Validator.CacheStreamOffset, _Validator.CacheStreamLength)); 493_ResponseStreamLength = _Validator.CacheStreamLength; 498if (_Validator.CacheStream == null || _Validator.CacheStream == Stream.Null) 501_ProtocolException = new InvalidOperationException(SR.GetString(SR.net_cache_no_stream, _Validator.CacheKey)); 510stream = new CombinedReadStream(_Validator.CacheStream, responseStream); 515stream = _Validator.CacheStream; 518_ResponseStreamLength = _Validator.CacheStreamLength; 530_ProtocolException = new InvalidOperationException(SR.GetString(SR.net_cache_validator_result, "RevalidateCache", _Validator.ValidationStatus.ToString())); 531if(Logging.On) Logging.PrintError(Logging.RequestCache, SR.GetString(SR.net_log_cache_unexpected_status, "RevalidateCache()", _Validator.ValidationStatus.ToString())); 550_Validator.CacheStream = Stream.Null; 560if (_Validator.CacheEntry == null) 565_Validator.FetchCacheEntry(cacheEntry); 573string retrieveKey = _Validator.CacheKey; 591_Validator.CacheKey, 592_Validator.CacheEntry.ExpiresUtc, 593_Validator.CacheEntry.LastModifiedUtc, 594_Validator.CacheEntry.LastSynchronizedUtc, 595_Validator.CacheEntry.MaxStale, 596_Validator.CacheEntry.EntryMetadata, 597_Validator.CacheEntry.SystemMetadata, 598_Validator.StrictCacheErrors); 614if (_Validator.StrictCacheErrors) 615{stream = _RequestCache.Store(_Validator.CacheKey, _Validator.CacheEntry.StreamSize, _Validator.CacheEntry.ExpiresUtc, _Validator.CacheEntry.LastModifiedUtc, _Validator.CacheEntry.MaxStale, _Validator.CacheEntry.EntryMetadata, _Validator.CacheEntry.SystemMetadata);} 617{_RequestCache.TryStore(_Validator.CacheKey, _Validator.CacheEntry.StreamSize, _Validator.CacheEntry.ExpiresUtc, _Validator.CacheEntry.LastModifiedUtc, _Validator.CacheEntry.MaxStale, _Validator.CacheEntry.EntryMetadata, _Validator.CacheEntry.SystemMetadata, out stream);} 624_ResponseStream = new ForwardingReadStream(responseStream, stream, _Validator.CacheStreamOffset, _Validator.StrictCacheErrors); 638_ProtocolException = new InvalidOperationException(SR.GetString(SR.net_cache_validator_result, "UpdateCache", _Validator.ValidationStatus.ToString())); 639if(Logging.On) Logging.PrintError(Logging.RequestCache, SR.GetString(SR.net_log_cache_unexpected_status, "UpdateCache()", _Validator.ValidationStatus.ToString())); 647_RequestCache.UnlockEntry(_Validator.CacheStream); 655"Request#" + _Validator.Request.GetHashCode().ToString(NumberFormatInfo.InvariantInfo) + 656", Policy = " + _Validator.Request.CachePolicy.ToString() + 657", Cache Uri = " + _Validator.Uri); 659CacheValidationStatus result = _Validator.ValidateRequest(); 660_Validator.SetValidationStatus(result); 662if(Logging.On) Logging.PrintInfo(Logging.RequestCache, "Selected cache Key = " + _Validator.CacheKey); 670_Validator.FetchCacheEntry(fetchEntry); 672if (_Validator.CacheStream == null || _Validator.CacheStream == Stream.Null) { 674_Validator.SetFreshnessStatus(CacheFreshnessStatus.Undefined); 697CacheFreshnessStatus result = _Validator.ValidateFreshness(); 698_Validator.SetFreshnessStatus(result); 708CacheValidationStatus result = _Validator.ValidateCache(); 709_Validator.SetValidationStatus(result); 717CacheValidationStatus result = _Validator.RevalidateCache(); 718_Validator.SetValidationStatus(result); 727CacheValidationStatus result = _Validator.ValidateResponse(); 728_Validator.SetValidationStatus(result); 736CacheValidationStatus result = _Validator.UpdateCache(); 737_Validator.SetValidationStatus(result); 745_RequestCache.UnlockEntry(_Validator.CacheStream); 747if (_Validator.StrictCacheErrors) 753if (retrieveKey != _Validator.CacheKey) 755if (_Validator.StrictCacheErrors) 756{_RequestCache.Remove(_Validator.CacheKey);} 758{_RequestCache.TryRemove(_Validator.CacheKey);}