Microsoft.Net.Http.Headers Sets both FileName and FileNameStar using encodings appropriate for HTTP headers. Sets the FileName parameter using encodings appropriate for MIME headers. The FileNameStar parameter is removed. Various extension methods for for identifying the type of the disposition header Checks if the content disposition header is a file disposition The header to check True if the header is file disposition, false otherwise Checks if the content disposition header is a form disposition The header to check True if the header is form disposition, false otherwise Check against another for equality. This equality check should not be used to determine if two values match under the RFC specifications (https://tools.ietf.org/html/rfc7232#section-2.3.2). The other value to check against for equality. true if the strength and tag of the two values match, false if the other value is null, is not an , or if there is a mismatch of strength or tag between the two values. Compares against another to see if they match under the RFC specifications (https://tools.ietf.org/html/rfc7232#section-2.3.2). The other to compare against. true to use a strong comparison, false to use a weak comparison true if the match for the given comparison type, false if the other value is null or the comparison failed. Quality factor to indicate a perfect match. Quality factor to indicate no match. Try to find a target header value among the set of given header values and parse it as a . The containing the set of header values to search. The target header value to look for. When this method returns, contains the parsed , if the parsing succeeded, or null if the parsing failed. The conversion fails if the was not found or could not be parsed as a . This parameter is passed uninitialized; any value originally supplied in result will be overwritten. true if is found and successfully parsed; otherwise, false. Check if a target directive exists among the set of given cache control directives. The containing the set of cache control directives. The target cache control directives to look for. true if is contained in ; otherwise, false. Try to convert a string representation of a positive number to its 64-bit signed integer equivalent. A return value indicates whether the conversion succeeded or failed. A string containing a number to convert. When this method returns, contains the 64-bit signed integer value equivalent of the number contained in the string, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the string is null or String.Empty, is not of the correct format, is negative, or represents a number greater than Int64.MaxValue. This parameter is passed uninitialized; any value originally supplied in result will be overwritten. true if parsing succeeded; otherwise, false. Try to convert a representation of a positive number to its 64-bit signed integer equivalent. A return value indicates whether the conversion succeeded or failed. A containing a number to convert. When this method returns, contains the 64-bit signed integer value equivalent of the number contained in the string, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the is null or String.Empty, is not of the correct format, is negative, or represents a number greater than Int64.MaxValue. This parameter is passed uninitialized; any value originally supplied in result will be overwritten. true if parsing succeeded; otherwise, false. Converts the non-negative 64-bit numeric value to its equivalent string representation. The number to convert. The string representation of the value of this instance, consisting of a sequence of digits ranging from 0 to 9 with no leading zeroes. Given a quoted-string as defined by the RFC specification, removes quotes and unescapes backslashes and quotes. This assumes that the input is a valid quoted-string. The quoted-string to be unescaped. An unescaped version of the quoted-string. Escapes a as a quoted-string, which is defined by the RFC specification. This will add a backslash before each backslash and quote and add quotes around the input. Assumes that the input does not have quotes around it, as this method will add them. Throws if the input contains any invalid escape characters, as defined by rfc7230. The input to be escaped. An escaped version of the quoted-string. Representation of the media type header. See . Initializes a instance. A representation of a media type. The text provided must be a single media type without parameters. Initializes a instance. A representation of a media type. The text provided must be a single media type without parameters. The with the quality of the media type. Gets or sets the value of the charset parameter. Returns if there is no charset. Gets or sets the value of the Encoding parameter. Setting the Encoding will set the to . Gets or sets the value of the boundary parameter. Returns if there is no boundary. Gets or sets the media type's parameters. Returns an empty if there are no parameters. Gets or sets the value of the quality parameter. Returns null if there is no quality. Gets or sets the value of the media type. Returns if there is no media type. For the media type "application/json", the property gives the value "application/json". Gets the type of the . For the media type "application/json", the property gives the value "application". See for more details on the type. Gets the subtype of the . For the media type "application/vnd.example+json", the property gives the value "vnd.example+json". See for more details on the subtype. Gets subtype of the , excluding any structured syntax suffix. Returns if there is no subtype without suffix. For the media type "application/vnd.example+json", the property gives the value "vnd.example". Gets the structured syntax suffix of the if it has one. See The RFC documentation on structured syntaxes. For the media type "application/vnd.example+json", the property gives the value "json". Get a of facets of the . Facets are a period separated list of StringSegments in the . See The RFC documentation on facets. For the media type "application/vnd.example+json", the property gives the value: {"vnd", "example"} Gets whether this matches all types. Gets whether this matches all subtypes. For the media type "application/*", this property is true. For the media type "application/json", this property is false. Gets whether this matches all subtypes, ignoring any structured syntax suffix. For the media type "application/*+json", this property is true. For the media type "application/vnd.example+json", this property is false. Gets whether the is readonly. Gets a value indicating whether this is a subset of . A "subset" is defined as the same or a more specific media type according to the precedence described in https://www.ietf.org/rfc/rfc2068.txt section 14.1, Accept. The to compare. A value indicating whether this is a subset of . For example "multipart/mixed; boundary=1234" is a subset of "multipart/mixed; boundary=1234", "multipart/mixed", "multipart/*", and "*/*" but not "multipart/mixed; boundary=2345" or "multipart/message; boundary=1234". Performs a deep copy of this object and all of it's NameValueHeaderValue sub components, while avoiding the cost of re-validating the components. A deep copy. Performs a deep copy of this object and all of it's NameValueHeaderValue sub components, while avoiding the cost of re-validating the components. This copy is read-only. A deep, read-only, copy. Takes a media type and parses it into the and its associated parameters. The with the media type. The parsed . Takes a media type, which can include parameters, and parses it into the and its associated parameters. The with the media type. The media type constructed here must not have an y The parsed True if the value was successfully parsed. Takes an of and parses it into the and its associated parameters. A list of media types The parsed . Takes an of and parses it into the and its associated parameters. Throws if there is invalid data in a string. A list of media types The parsed . Takes an of and parses it into the and its associated parameters. A list of media types The parsed . True if the value was successfully parsed. Takes an of and parses it into the and its associated parameters. A list of media types The parsed . True if the value was successfully parsed. Implementation of that can compare accept media type header fields based on their quality values (a.k.a q-values). Performs comparisons based on the arguments' quality values (aka their "q-value"). Values with identical q-values are considered equal (i.e. the result is 0) with the exception that suffixed subtype wildcards are considered less than subtype wildcards, subtype wildcards are considered less than specific media types and full wildcards are considered less than subtype wildcards. This allows callers to sort a sequence of following their q-values in the order of specific media types, subtype wildcards, and last any full wildcards. If we had a list of media types (comma separated): { text/*;q=0.8, text/*+json;q=0.8, */*;q=1, */*;q=0.8, text/plain;q=0.8 } Sorting them using Compare would return: { */*;q=0.8, text/*;q=0.8, text/*+json;q=0.8, text/plain;q=0.8, */*;q=1 } Provides a copy of this object without the cost of re-validating the values. A copy. Append string representation of this to given . The to receive the string representation of this . Implementation of that can compare content negotiation header fields based on their quality values (a.k.a q-values). This applies to values used in accept-charset, accept-encoding, accept-language and related header fields with similar syntax rules. See for a comparer for media type q-values. Compares two based on their quality value (a.k.a their "q-value"). Values with identical q-values are considered equal (i.e the result is 0) with the exception of wild-card values (i.e. a value of "*") which are considered less than non-wild-card values. This allows to sort a sequence of following their q-values ending up with any wild-cards at the end. The first value to compare. The second value to compare The result of the comparison.