7 instantiations of ReadOnlyMediaTypeHeaderValue
Microsoft.AspNetCore.Routing (7)
Matching\AcceptsMatcherPolicy.cs (6)
93
var mediaType = string.IsNullOrEmpty(contentType) ? (ReadOnlyMediaTypeHeaderValue?)null :
new
(contentType);
98
var candidateMediaType = new
ReadOnlyMediaTypeHeaderValue
(metadata.ContentTypes[j]);
195
var edgeKey = new
ReadOnlyMediaTypeHeaderValue
(kvp.Key);
201
var mediaType = new
ReadOnlyMediaTypeHeaderValue
(contentType);
308
return !string.IsNullOrEmpty(mediaType) ? new
ReadOnlyMediaTypeHeaderValue
(mediaType) : default;
365
var requestMediaType = new
ReadOnlyMediaTypeHeaderValue
(contentType);
src\Shared\MediaType\ReadOnlyMediaTypeHeaderValue.cs (1)
343
var parsedMediaType = new
ReadOnlyMediaTypeHeaderValue
(mediaType);
37 references to ReadOnlyMediaTypeHeaderValue
Microsoft.AspNetCore.Routing (37)
Matching\AcceptsMatcherPolicy.cs (13)
93
var mediaType = string.IsNullOrEmpty(contentType) ? (
ReadOnlyMediaTypeHeaderValue
?)null : new(contentType);
98
var
candidateMediaType = new ReadOnlyMediaTypeHeaderValue(metadata.ContentTypes[j]);
195
var
edgeKey = new ReadOnlyMediaTypeHeaderValue(kvp.Key);
201
var
mediaType = new ReadOnlyMediaTypeHeaderValue(contentType);
266
var ordered = new (
ReadOnlyMediaTypeHeaderValue
mediaType, int destination)[edges.Count];
290
private static int GetNoContentTypeDestination((
ReadOnlyMediaTypeHeaderValue
mediaType, int destination)[] destinations)
294
var
mediaType = destinations[i].mediaType;
305
private static
ReadOnlyMediaTypeHeaderValue
CreateEdgeMediaType(ref PolicyJumpTableEdge e)
311
private static int GetScore(
ReadOnlyMediaTypeHeaderValue
mediaType)
345
private readonly (
ReadOnlyMediaTypeHeaderValue
mediaType, int destination)[] _destinations;
349
public ConsumesPolicyJumpTable(int exitDestination, int noContentTypeDestination, (
ReadOnlyMediaTypeHeaderValue
mediaType, int destination)[] destinations)
365
var
requestMediaType = new ReadOnlyMediaTypeHeaderValue(contentType);
369
var
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>.
259
public bool IsSubsetOf(
ReadOnlyMediaTypeHeaderValue
set)
343
var
parsedMediaType = new ReadOnlyMediaTypeHeaderValue(mediaType);
369
private bool MatchesType(
ReadOnlyMediaTypeHeaderValue
set)
375
private bool MatchesSubtype(
ReadOnlyMediaTypeHeaderValue
set)
404
private bool MatchesSubtypeWithoutSuffix(
ReadOnlyMediaTypeHeaderValue
set)
410
private bool MatchesSubtypeSuffix(
ReadOnlyMediaTypeHeaderValue
set)
417
private bool MatchesEitherSubtypeOrSuffix(
ReadOnlyMediaTypeHeaderValue
set)