internal static bool?GetTransferEncodingChunked(HttpHeaders parent, HttpGeneralHeaders?headers) { if (parent.ContainsParsedValue(KnownHeaders.TransferEncoding.Descriptor, HeaderUtilities.TransferEncodingChunked)) { return(true); } if (headers != null && headers._transferEncodingChunkedSet) { return(false); } return(null); }
internal static bool?GetConnectionClose(HttpHeaders parent, HttpGeneralHeaders?headers) { if (parent.ContainsParsedValue(KnownHeaders.Connection.Descriptor, HeaderUtilities.ConnectionClose)) { return(true); } if (headers != null && headers._connectionCloseSet) { return(false); } return(null); }
internal static bool?GetConnectionClose(HttpHeaders parent, HttpGeneralHeaders headers) { // If we've already initialized the connection header value collection // and it contains the special value, or if we haven't and the headers contain // the parsed special value, return true. We don't just access ConnectionCore, // as doing so will unnecessarily initialize the collection even if it's not needed. if (headers?._connection != null) { if (headers._connection.IsSpecialValueSet) { return(true); } } else if (parent.ContainsParsedValue(KnownHeaders.Connection.Descriptor, HeaderUtilities.ConnectionClose)) { return(true); } if (headers != null && headers._connectionCloseSet) { return(false); } return(null); }
internal static bool?GetTransferEncodingChunked(HttpHeaders parent, HttpGeneralHeaders headers) { // If we've already initialized the transfer encoding header value collection // and it contains the special value, or if we haven't and the headers contain // the parsed special value, return true. We don't just access TransferEncodingCore, // as doing so will unnecessarily initialize the collection even if it's not needed. if (headers?._transferEncoding != null) { if (headers._transferEncoding.IsSpecialValueSet) { return(true); } } else if (parent.ContainsParsedValue(HttpKnownHeaderNames.TransferEncoding, HeaderUtilities.TransferEncodingChunked)) { return(true); } if (headers != null && headers._transferEncodingChunkedSet) { return(false); } return(null); }
public bool Contains(T item) { CheckValue(item); return(_store.ContainsParsedValue(_descriptor, item)); }
public bool Contains(T item) { CheckValue(item); return(_store.ContainsParsedValue(_headerName, item)); }