7 instantiations of ReadOnlyMediaTypeHeaderValue
Microsoft.AspNetCore.Routing (7)
Matching\AcceptsMatcherPolicy.cs (6)
93var mediaType = string.IsNullOrEmpty(contentType) ? (ReadOnlyMediaTypeHeaderValue?)null : new(contentType); 98var candidateMediaType = new ReadOnlyMediaTypeHeaderValue(metadata.ContentTypes[j]); 195var edgeKey = new ReadOnlyMediaTypeHeaderValue(kvp.Key); 201var mediaType = new ReadOnlyMediaTypeHeaderValue(contentType); 308return !string.IsNullOrEmpty(mediaType) ? new ReadOnlyMediaTypeHeaderValue(mediaType) : default; 365var requestMediaType = new ReadOnlyMediaTypeHeaderValue(contentType);
src\Shared\MediaType\ReadOnlyMediaTypeHeaderValue.cs (1)
343var parsedMediaType = new ReadOnlyMediaTypeHeaderValue(mediaType);
37 references to ReadOnlyMediaTypeHeaderValue
Microsoft.AspNetCore.Routing (37)
Matching\AcceptsMatcherPolicy.cs (13)
93var mediaType = string.IsNullOrEmpty(contentType) ? (ReadOnlyMediaTypeHeaderValue?)null : new(contentType); 98var candidateMediaType = new ReadOnlyMediaTypeHeaderValue(metadata.ContentTypes[j]); 195var edgeKey = new ReadOnlyMediaTypeHeaderValue(kvp.Key); 201var mediaType = new ReadOnlyMediaTypeHeaderValue(contentType); 266var ordered = new (ReadOnlyMediaTypeHeaderValue mediaType, int destination)[edges.Count]; 290private static int GetNoContentTypeDestination((ReadOnlyMediaTypeHeaderValue mediaType, int destination)[] destinations) 294var mediaType = destinations[i].mediaType; 305private static ReadOnlyMediaTypeHeaderValue CreateEdgeMediaType(ref PolicyJumpTableEdge e) 311private static int GetScore(ReadOnlyMediaTypeHeaderValue mediaType) 345private readonly (ReadOnlyMediaTypeHeaderValue mediaType, int destination)[] _destinations; 349public ConsumesPolicyJumpTable(int exitDestination, int noContentTypeDestination, (ReadOnlyMediaTypeHeaderValue mediaType, int destination)[] destinations) 365var requestMediaType = new ReadOnlyMediaTypeHeaderValue(contentType); 369var destination = destinations[i].mediaType;
src\Shared\MediaType\ReadOnlyMediaTypeHeaderValue.cs (24)
16/// Initializes a <see cref="ReadOnlyMediaTypeHeaderValue"/> instance. 25/// Initializes a <see cref="ReadOnlyMediaTypeHeaderValue"/> instance. 162/// Gets the type of the <see cref="ReadOnlyMediaTypeHeaderValue"/>. 170/// Gets whether this <see cref="ReadOnlyMediaTypeHeaderValue"/> matches all types. 175/// Gets the subtype of the <see cref="ReadOnlyMediaTypeHeaderValue"/>. 184/// Gets the subtype of the <see cref="ReadOnlyMediaTypeHeaderValue"/>, excluding any structured syntax suffix. 193/// Gets the structured syntax suffix of the <see cref="ReadOnlyMediaTypeHeaderValue"/> if it has one. 202/// Gets whether this <see cref="ReadOnlyMediaTypeHeaderValue"/> matches all subtypes. 213/// Gets whether this <see cref="ReadOnlyMediaTypeHeaderValue"/> matches all subtypes, ignoring any structured syntax suffix. 224/// Gets the <see cref="System.Text.Encoding"/> of the <see cref="ReadOnlyMediaTypeHeaderValue"/> if it has one. 229/// Gets the charset parameter of the <see cref="ReadOnlyMediaTypeHeaderValue"/> if it has one. 234/// Determines whether the current <see cref="ReadOnlyMediaTypeHeaderValue"/> contains a wildcard. 237/// <c>true</c> if this <see cref="ReadOnlyMediaTypeHeaderValue"/> contains a wildcard; otherwise <c>false</c>. 252/// Determines whether the current <see cref="ReadOnlyMediaTypeHeaderValue"/> is a subset of the <paramref name="set"/> 253/// <see cref="ReadOnlyMediaTypeHeaderValue"/>. 255/// <param name="set">The set <see cref="ReadOnlyMediaTypeHeaderValue"/>.</param> 257/// <c>true</c> if this <see cref="ReadOnlyMediaTypeHeaderValue"/> is a subset of <paramref name="set"/>; otherwise <c>false</c>. 259public bool IsSubsetOf(ReadOnlyMediaTypeHeaderValue set) 343var parsedMediaType = new ReadOnlyMediaTypeHeaderValue(mediaType); 369private bool MatchesType(ReadOnlyMediaTypeHeaderValue set) 375private bool MatchesSubtype(ReadOnlyMediaTypeHeaderValue set) 404private bool MatchesSubtypeWithoutSuffix(ReadOnlyMediaTypeHeaderValue set) 410private bool MatchesSubtypeSuffix(ReadOnlyMediaTypeHeaderValue set) 417private bool MatchesEitherSubtypeOrSuffix(ReadOnlyMediaTypeHeaderValue set)