Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
 public bool Contains(T item)
 {
     CheckValue(item);
     return(_store.ContainsParsedValue(_descriptor, item));
 }
Exemplo n.º 6
0
 public bool Contains(T item)
 {
     CheckValue(item);
     return(_store.ContainsParsedValue(_headerName, item));
 }