1 instantiation of MediaTypeSegmentWithQuality
Microsoft.AspNetCore.Mvc.Core (1)
Formatters\MediaType.cs (1)
293
return new
MediaTypeSegmentWithQuality
(
34 references to MediaTypeSegmentWithQuality
Microsoft.AspNetCore.Mvc.Core (34)
_generated\0\LoggerMessage.g.cs (9)
801
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Collections.Generic.IList<global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeSegmentWithQuality
>, global::System.Exception?> __NoFormatterFromNegotiationCallback =
802
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Collections.Generic.IList<global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeSegmentWithQuality
>>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(5, "NoFormatterFromNegotiation"), "Could not find an output formatter based on content negotiation. Accepted types were ({AcceptTypes})", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
809
public static partial void NoFormatterFromNegotiation(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Collections.Generic.IList<global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeSegmentWithQuality
> acceptTypes)
817
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Collections.Generic.IEnumerable<global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeSegmentWithQuality
>, global::System.Exception?> __SelectingOutputFormatterUsingAcceptHeaderCallback =
818
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Collections.Generic.IEnumerable<global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeSegmentWithQuality
>>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(6, "SelectingOutputFormatterUsingAcceptHeader"), "Attempting to select an output formatter based on Accept header '{AcceptHeader}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
825
public static partial void SelectingOutputFormatterUsingAcceptHeader(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Collections.Generic.IEnumerable<global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeSegmentWithQuality
> acceptHeader)
833
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Collections.Generic.IEnumerable<global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeSegmentWithQuality
>, global::Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection, global::System.Exception?> __SelectingOutputFormatterUsingAcceptHeaderAndExplicitContentTypesCallback =
834
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Collections.Generic.IEnumerable<global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeSegmentWithQuality
>, global::Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(7, "SelectingOutputFormatterUsingAcceptHeaderAndExplicitContentTypes"), "Attempting to select an output formatter based on Accept header '{AcceptHeader}' and explicitly specified content types '{ExplicitContentTypes}'. The content types in the accept header must be a subset of the explicitly set content types.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
841
public static partial void SelectingOutputFormatterUsingAcceptHeaderAndExplicitContentTypes(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Collections.Generic.IEnumerable<global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeSegmentWithQuality
> acceptHeader, global::Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection explicitContentTypes)
Formatters\AcceptHeaderParser.cs (9)
11
public static IList<
MediaTypeSegmentWithQuality
> ParseAcceptHeader(IList<string> acceptHeaders)
13
var parsedValues = new List<
MediaTypeSegmentWithQuality
>();
19
public static void ParseAcceptHeader(IList<string> acceptHeaders, IList<
MediaTypeSegmentWithQuality
> parsedValues)
32
if (TryParseValue(value, ref charIndex, out
var
output))
50
private static bool TryParseValue(string value, ref int index, out
MediaTypeSegmentWithQuality
parsedValue)
52
parsedValue = default(
MediaTypeSegmentWithQuality
);
79
var
result = default(
MediaTypeSegmentWithQuality
);
153
out
MediaTypeSegmentWithQuality
result)
Formatters\MediaType.cs (4)
254
/// Creates an <see cref="
MediaTypeSegmentWithQuality
"/> containing the media type in <paramref name="mediaType"/>
260
public static
MediaTypeSegmentWithQuality
CreateMediaTypeSegmentWithQuality(string mediaType, int start)
269
return default(
MediaTypeSegmentWithQuality
);
290
return default(
MediaTypeSegmentWithQuality
);
Formatters\MediaTypeSegmentWithQuality.cs (3)
14
/// Initializes an instance of <see cref="
MediaTypeSegmentWithQuality
"/>.
25
/// Gets the media type of this <see cref="
MediaTypeSegmentWithQuality
"/>.
30
/// Gets the quality of this <see cref="
MediaTypeSegmentWithQuality
"/>.
Infrastructure\DefaultOutputFormatterSelector.cs (9)
22
private static readonly Comparison<
MediaTypeSegmentWithQuality
> _sortFunction = (left, right) =>
149
private List<
MediaTypeSegmentWithQuality
> GetAcceptableMediaTypes(HttpRequest request)
151
var result = new List<
MediaTypeSegmentWithQuality
>();
191
IList<
MediaTypeSegmentWithQuality
> sortedAcceptHeaders)
195
var
mediaType = sortedAcceptHeaders[i];
238
IList<
MediaTypeSegmentWithQuality
> sortedAcceptableContentTypes,
304
public static partial void NoFormatterFromNegotiation(ILogger logger, IList<
MediaTypeSegmentWithQuality
> acceptTypes);
307
public static partial void SelectingOutputFormatterUsingAcceptHeader(ILogger logger, IEnumerable<
MediaTypeSegmentWithQuality
> acceptHeader);
310
public static partial void SelectingOutputFormatterUsingAcceptHeaderAndExplicitContentTypes(ILogger logger, IEnumerable<
MediaTypeSegmentWithQuality
> acceptHeader, MediaTypeCollection explicitContentTypes);