2 writes to _descriptor
System.Net.Http (2)
System\Net\Http\Headers\HeaderDescriptor.cs (2)
25
_descriptor
= knownHeader;
32
_descriptor
= headerName;
14 references to _descriptor
System.Net.Http (14)
System\Net\Http\Headers\HeaderDescriptor.cs (14)
35
public string Name =>
_descriptor
is KnownHeader header ? header.Name : (
_descriptor
as string)!;
36
public HttpHeaderParser? Parser => (
_descriptor
as KnownHeader)?.Parser;
37
public HttpHeaderType HeaderType =>
_descriptor
is KnownHeader knownHeader ? knownHeader.HeaderType : HttpHeaderType.Custom;
38
public KnownHeader? KnownHeader =>
_descriptor
as KnownHeader;
40
public bool Equals(KnownHeader other) => ReferenceEquals(
_descriptor
, other);
44
if (
_descriptor
is string headerName)
46
return string.Equals(headerName, other.
_descriptor
as string, StringComparison.OrdinalIgnoreCase);
50
return ReferenceEquals(
_descriptor
, other.
_descriptor
);
54
public override int GetHashCode() =>
_descriptor
is KnownHeader knownHeader ? knownHeader.GetHashCode() : StringComparer.OrdinalIgnoreCase.GetHashCode(
_descriptor
);
127
Debug.Assert(
_descriptor
is KnownHeader);
140
if (
_descriptor
is KnownHeader knownHeader)