138 references to Descriptor
System.Net.Http (138)
System\Net\Http\Headers\HttpContentHeaders.cs (20)
18_allow ??= new HttpHeaderValueCollection<string>(KnownHeaders.Allow.Descriptor, this); 22get { return (ContentDispositionHeaderValue?)GetSingleParsedValue(KnownHeaders.ContentDisposition.Descriptor); } 23set { SetOrRemoveParsedValue(KnownHeaders.ContentDisposition.Descriptor, value); } 29_contentEncoding ??= new HttpHeaderValueCollection<string>(KnownHeaders.ContentEncoding.Descriptor, this); 32_contentLanguage ??= new HttpHeaderValueCollection<string>(KnownHeaders.ContentLanguage.Descriptor, this); 39object? storedValue = GetSingleParsedValue(KnownHeaders.ContentLength.Descriptor); 51SetParsedValue(KnownHeaders.ContentLength.Descriptor, (object)calculatedLength.Value); 68SetOrRemoveParsedValue(KnownHeaders.ContentLength.Descriptor, value); // box long value 75get { return (Uri?)GetSingleParsedValue(KnownHeaders.ContentLocation.Descriptor); } 76set { SetOrRemoveParsedValue(KnownHeaders.ContentLocation.Descriptor, value); } 81get { return (byte[]?)GetSingleParsedValue(KnownHeaders.ContentMD5.Descriptor); } 82set { SetOrRemoveParsedValue(KnownHeaders.ContentMD5.Descriptor, value); } 87get { return (ContentRangeHeaderValue?)GetSingleParsedValue(KnownHeaders.ContentRange.Descriptor); } 88set { SetOrRemoveParsedValue(KnownHeaders.ContentRange.Descriptor, value); } 93get { return (MediaTypeHeaderValue?)GetSingleParsedValue(KnownHeaders.ContentType.Descriptor); } 94set { SetOrRemoveParsedValue(KnownHeaders.ContentType.Descriptor, value); } 99get { return HeaderUtilities.GetDateTimeOffsetValue(KnownHeaders.Expires.Descriptor, this, DateTimeOffset.MinValue); } 100set { SetOrRemoveParsedValue(KnownHeaders.Expires.Descriptor, value); } 105get { return HeaderUtilities.GetDateTimeOffsetValue(KnownHeaders.LastModified.Descriptor, this); } 106set { SetOrRemoveParsedValue(KnownHeaders.LastModified.Descriptor, value); }
System\Net\Http\Headers\HttpGeneralHeaders.cs (20)
25get { return (CacheControlHeaderValue?)_parent.GetSingleParsedValue(KnownHeaders.CacheControl.Descriptor); } 26set { _parent.SetOrRemoveParsedValue(KnownHeaders.CacheControl.Descriptor, value); } 43if (!_parent.ContainsParsedValue(KnownHeaders.Connection.Descriptor, HeaderUtilities.ConnectionClose)) 45_parent.AddParsedValue(KnownHeaders.Connection.Descriptor, HeaderUtilities.ConnectionClose); 52_parent.RemoveParsedValue(KnownHeaders.Connection.Descriptor, HeaderUtilities.ConnectionClose); 59if (parent.ContainsParsedValue(KnownHeaders.Connection.Descriptor, HeaderUtilities.ConnectionClose)) 72get { return HeaderUtilities.GetDateTimeOffsetValue(KnownHeaders.Date.Descriptor, _parent); } 73set { _parent.SetOrRemoveParsedValue(KnownHeaders.Date.Descriptor, value); } 77_pragma ??= new HttpHeaderValueCollection<NameValueHeaderValue>(KnownHeaders.Pragma.Descriptor, _parent); 80_trailer ??= new HttpHeaderValueCollection<string>(KnownHeaders.Trailer.Descriptor, _parent); 84if (parent.TryGetHeaderValue(KnownHeaders.TransferEncoding.Descriptor, out object? value)) 92if (parent.ContainsParsedValue(KnownHeaders.TransferEncoding.Descriptor, HeaderUtilities.TransferEncodingChunked)) 120if (!_parent.ContainsParsedValue(KnownHeaders.TransferEncoding.Descriptor, HeaderUtilities.TransferEncodingChunked)) 122_parent.AddParsedValue(KnownHeaders.TransferEncoding.Descriptor, HeaderUtilities.TransferEncodingChunked); 129_parent.RemoveParsedValue(KnownHeaders.TransferEncoding.Descriptor, HeaderUtilities.TransferEncodingChunked); 135_upgrade ??= new HttpHeaderValueCollection<ProductHeaderValue>(KnownHeaders.Upgrade.Descriptor, _parent); 138_via ??= new HttpHeaderValueCollection<ViaHeaderValue>(KnownHeaders.Via.Descriptor, _parent); 141_warning ??= new HttpHeaderValueCollection<WarningHeaderValue>(KnownHeaders.Warning.Descriptor, _parent); 144_connection ??= new HttpHeaderValueCollection<string>(KnownHeaders.Connection.Descriptor, _parent); 147_transferEncoding ??= new HttpHeaderValueCollection<TransferCodingHeaderValue>(KnownHeaders.TransferEncoding.Descriptor, _parent);
System\Net\Http\Headers\HttpRequestHeaders.cs (33)
38GetSpecializedCollection(AcceptSlot, static thisRef => new HttpHeaderValueCollection<MediaTypeWithQualityHeaderValue>(KnownHeaders.Accept.Descriptor, thisRef)); 41GetSpecializedCollection(AcceptCharsetSlot, static thisRef => new HttpHeaderValueCollection<StringWithQualityHeaderValue>(KnownHeaders.AcceptCharset.Descriptor, thisRef)); 44GetSpecializedCollection(AcceptEncodingSlot, static thisRef => new HttpHeaderValueCollection<StringWithQualityHeaderValue>(KnownHeaders.AcceptEncoding.Descriptor, thisRef)); 47GetSpecializedCollection(AcceptLanguageSlot, static thisRef => new HttpHeaderValueCollection<StringWithQualityHeaderValue>(KnownHeaders.AcceptLanguage.Descriptor, thisRef)); 51get { return (AuthenticationHeaderValue?)GetSingleParsedValue(KnownHeaders.Authorization.Descriptor); } 52set { SetOrRemoveParsedValue(KnownHeaders.Authorization.Descriptor, value); } 59if (ContainsParsedValue(KnownHeaders.Expect.Descriptor, HeaderUtilities.ExpectContinue)) 75if (!ContainsParsedValue(KnownHeaders.Expect.Descriptor, HeaderUtilities.ExpectContinue)) 77AddParsedValue(KnownHeaders.Expect.Descriptor, HeaderUtilities.ExpectContinue); 84RemoveParsedValue(KnownHeaders.Expect.Descriptor, HeaderUtilities.ExpectContinue); 91get { return (string?)GetSingleParsedValue(KnownHeaders.From.Descriptor); } 102SetOrRemoveParsedValue(KnownHeaders.From.Descriptor, value); 108get { return (string?)GetSingleParsedValue(KnownHeaders.Host.Descriptor); } 121SetOrRemoveParsedValue(KnownHeaders.Host.Descriptor, value); 126GetSpecializedCollection(IfMatchSlot, static thisRef => new HttpHeaderValueCollection<EntityTagHeaderValue>(KnownHeaders.IfMatch.Descriptor, thisRef)); 130get { return HeaderUtilities.GetDateTimeOffsetValue(KnownHeaders.IfModifiedSince.Descriptor, this); } 131set { SetOrRemoveParsedValue(KnownHeaders.IfModifiedSince.Descriptor, value); } 135GetSpecializedCollection(IfNoneMatchSlot, static thisRef => new HttpHeaderValueCollection<EntityTagHeaderValue>(KnownHeaders.IfNoneMatch.Descriptor, thisRef)); 139get { return (RangeConditionHeaderValue?)GetSingleParsedValue(KnownHeaders.IfRange.Descriptor); } 140set { SetOrRemoveParsedValue(KnownHeaders.IfRange.Descriptor, value); } 145get { return HeaderUtilities.GetDateTimeOffsetValue(KnownHeaders.IfUnmodifiedSince.Descriptor, this); } 146set { SetOrRemoveParsedValue(KnownHeaders.IfUnmodifiedSince.Descriptor, value); } 153object? storedValue = GetSingleParsedValue(KnownHeaders.MaxForwards.Descriptor); 160set { SetOrRemoveParsedValue(KnownHeaders.MaxForwards.Descriptor, value); } 178get { return (AuthenticationHeaderValue?)GetSingleParsedValue(KnownHeaders.ProxyAuthorization.Descriptor); } 179set { SetOrRemoveParsedValue(KnownHeaders.ProxyAuthorization.Descriptor, value); } 184get { return (RangeHeaderValue?)GetSingleParsedValue(KnownHeaders.Range.Descriptor); } 185set { SetOrRemoveParsedValue(KnownHeaders.Range.Descriptor, value); } 190get { return (Uri?)GetSingleParsedValue(KnownHeaders.Referer.Descriptor); } 191set { SetOrRemoveParsedValue(KnownHeaders.Referer.Descriptor, value); } 195GetSpecializedCollection(TransferEncodingSlot, static thisRef => new HttpHeaderValueCollection<TransferCodingWithQualityHeaderValue>(KnownHeaders.TE.Descriptor, thisRef)); 198GetSpecializedCollection(UserAgentSlot, static thisRef => new HttpHeaderValueCollection<ProductInfoHeaderValue>(KnownHeaders.UserAgent.Descriptor, thisRef)); 201GetSpecializedCollection(ExpectSlot, static thisRef => new HttpHeaderValueCollection<NameValueWithParametersHeaderValue>(KnownHeaders.Expect.Descriptor, thisRef));
System\Net\Http\Headers\HttpResponseHeaders.cs (13)
33GetSpecializedCollection(AcceptRangesSlot, static thisRef => new HttpHeaderValueCollection<string>(KnownHeaders.AcceptRanges.Descriptor, thisRef)); 37get { return HeaderUtilities.GetTimeSpanValue(KnownHeaders.Age.Descriptor, this); } 38set { SetOrRemoveParsedValue(KnownHeaders.Age.Descriptor, value); } 43get { return (EntityTagHeaderValue?)GetSingleParsedValue(KnownHeaders.ETag.Descriptor); } 44set { SetOrRemoveParsedValue(KnownHeaders.ETag.Descriptor, value); } 49get { return (Uri?)GetSingleParsedValue(KnownHeaders.Location.Descriptor); } 50set { SetOrRemoveParsedValue(KnownHeaders.Location.Descriptor, value); } 54GetSpecializedCollection(ProxyAuthenticateSlot, static thisRef => new HttpHeaderValueCollection<AuthenticationHeaderValue>(KnownHeaders.ProxyAuthenticate.Descriptor, thisRef)); 58get { return (RetryConditionHeaderValue?)GetSingleParsedValue(KnownHeaders.RetryAfter.Descriptor); } 59set { SetOrRemoveParsedValue(KnownHeaders.RetryAfter.Descriptor, value); } 63GetSpecializedCollection(ServerSlot, static thisRef => new HttpHeaderValueCollection<ProductInfoHeaderValue>(KnownHeaders.Server.Descriptor, thisRef)); 66GetSpecializedCollection(VarySlot, static thisRef => new HttpHeaderValueCollection<string>(KnownHeaders.Vary.Descriptor, thisRef)); 69GetSpecializedCollection(WwwAuthenticateSlot, static thisRef => new HttpHeaderValueCollection<AuthenticationHeaderValue>(KnownHeaders.WWWAuthenticate.Descriptor, thisRef));
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (1)
60if (!response.Headers.TryGetValues(KnownHeaders.ProxySupport.Descriptor, out IEnumerable<string>? values))
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (1)
789tunnelRequest.Headers.TryAddWithoutValidation(KnownHeaders.UserAgent.Descriptor, _connectTunnelUserAgent);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (1)
644if (_altSvcEnabled && response.Headers.TryGetValues(KnownHeaders.AltSvc.Descriptor, out IEnumerable<string>? altSvcHeaderValues))
System\Net\Http\SocketsHttpHandler\CookieHelper.cs (1)
14if (response.Headers.TryGetValues(KnownHeaders.SetCookie.Descriptor, out IEnumerable<string>? values))
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (47)
504(KnownHeaders.AcceptCharset.Descriptor, Array.Empty<byte>()), 505(KnownHeaders.AcceptEncoding.Descriptor, "gzip, deflate"u8.ToArray()), 506(KnownHeaders.AcceptLanguage.Descriptor, Array.Empty<byte>()), 507(KnownHeaders.AcceptRanges.Descriptor, Array.Empty<byte>()), 508(KnownHeaders.Accept.Descriptor, Array.Empty<byte>()), 509(KnownHeaders.AccessControlAllowOrigin.Descriptor, Array.Empty<byte>()), 510(KnownHeaders.Age.Descriptor, Array.Empty<byte>()), 511(KnownHeaders.Allow.Descriptor, Array.Empty<byte>()), 512(KnownHeaders.Authorization.Descriptor, Array.Empty<byte>()), 513(KnownHeaders.CacheControl.Descriptor, Array.Empty<byte>()), 514(KnownHeaders.ContentDisposition.Descriptor, Array.Empty<byte>()), 515(KnownHeaders.ContentEncoding.Descriptor, Array.Empty<byte>()), 516(KnownHeaders.ContentLanguage.Descriptor, Array.Empty<byte>()), 517(KnownHeaders.ContentLength.Descriptor, Array.Empty<byte>()), 518(KnownHeaders.ContentLocation.Descriptor, Array.Empty<byte>()), 519(KnownHeaders.ContentRange.Descriptor, Array.Empty<byte>()), 520(KnownHeaders.ContentType.Descriptor, Array.Empty<byte>()), 521(KnownHeaders.Cookie.Descriptor, Array.Empty<byte>()), 522(KnownHeaders.Date.Descriptor, Array.Empty<byte>()), 523(KnownHeaders.ETag.Descriptor, Array.Empty<byte>()), 524(KnownHeaders.Expect.Descriptor, Array.Empty<byte>()), 525(KnownHeaders.Expires.Descriptor, Array.Empty<byte>()), 526(KnownHeaders.From.Descriptor, Array.Empty<byte>()), 527(KnownHeaders.Host.Descriptor, Array.Empty<byte>()), 528(KnownHeaders.IfMatch.Descriptor, Array.Empty<byte>()), 529(KnownHeaders.IfModifiedSince.Descriptor, Array.Empty<byte>()), 530(KnownHeaders.IfNoneMatch.Descriptor, Array.Empty<byte>()), 531(KnownHeaders.IfRange.Descriptor, Array.Empty<byte>()), 532(KnownHeaders.IfUnmodifiedSince.Descriptor, Array.Empty<byte>()), 533(KnownHeaders.LastModified.Descriptor, Array.Empty<byte>()), 534(KnownHeaders.Link.Descriptor, Array.Empty<byte>()), 535(KnownHeaders.Location.Descriptor, Array.Empty<byte>()), 536(KnownHeaders.MaxForwards.Descriptor, Array.Empty<byte>()), 537(KnownHeaders.ProxyAuthenticate.Descriptor, Array.Empty<byte>()), 538(KnownHeaders.ProxyAuthorization.Descriptor, Array.Empty<byte>()), 539(KnownHeaders.Range.Descriptor, Array.Empty<byte>()), 540(KnownHeaders.Referer.Descriptor, Array.Empty<byte>()), 541(KnownHeaders.Refresh.Descriptor, Array.Empty<byte>()), 542(KnownHeaders.RetryAfter.Descriptor, Array.Empty<byte>()), 543(KnownHeaders.Server.Descriptor, Array.Empty<byte>()), 544(KnownHeaders.SetCookie.Descriptor, Array.Empty<byte>()), 545(KnownHeaders.StrictTransportSecurity.Descriptor, Array.Empty<byte>()), 546(KnownHeaders.TransferEncoding.Descriptor, Array.Empty<byte>()), 547(KnownHeaders.UserAgent.Descriptor, Array.Empty<byte>()), 548(KnownHeaders.Vary.Descriptor, Array.Empty<byte>()), 549(KnownHeaders.Via.Descriptor, Array.Empty<byte>()), 550(KnownHeaders.WWWAuthenticate.Descriptor, Array.Empty<byte>()),
System\Net\Http\StringContent.cs (1)
68Headers.TryAddWithoutValidation(KnownHeaders.ContentType.Descriptor, knownValue);