15 instantiations of MediaTypeCollection
Microsoft.AspNetCore.Mvc.ApiExplorer (6)
ApiResponseTypeProvider.cs (3)
96
var contentTypes = new
MediaTypeCollection
();
262
var attributeContentTypes = new
MediaTypeCollection
();
339
var attributeContentTypes = new
MediaTypeCollection
();
DefaultApiDescriptionProvider.cs (2)
437
contentTypes = new
MediaTypeCollection
472
var contentTypes = new
MediaTypeCollection
();
EndpointMetadataApiDescriptionProvider.cs (1)
334
var contentTypes = new
MediaTypeCollection
();
Microsoft.AspNetCore.Mvc.Core (9)
ConsumesAttribute.cs (1)
241
var contentTypes = new
MediaTypeCollection
();
Formatters\FormatFilter.cs (1)
84
var supportedMediaTypes = new
MediaTypeCollection
();
Formatters\InputFormatter.cs (1)
19
public MediaTypeCollection SupportedMediaTypes { get; } = new
MediaTypeCollection
();
Formatters\OutputFormatter.cs (1)
19
public MediaTypeCollection SupportedMediaTypes { get; } = new
MediaTypeCollection
();
Infrastructure\DefaultApiProblemDetailsWriter.cs (1)
17
private static readonly MediaTypeCollection _problemContentTypes =
new
()
ObjectResult.cs (1)
26
_contentTypes = new
MediaTypeCollection
();
ProducesAttribute.cs (2)
28
ContentTypes = new
MediaTypeCollection
();
112
var contentTypes = new
MediaTypeCollection
();
ProducesResponseTypeAttribute.cs (1)
113
MediaTypeCollection contentTypes =
new
();
59 references to MediaTypeCollection
Microsoft.AspNetCore.Mvc.ApiExplorer (11)
ApiResponseTypeProvider.cs (6)
96
var
contentTypes = new MediaTypeCollection();
163
MediaTypeCollection
contentTypes,
187
MediaTypeCollection
contentTypes,
262
var
attributeContentTypes = new MediaTypeCollection();
339
var
attributeContentTypes = new MediaTypeCollection();
374
internal static void CalculateResponseFormatForType(ApiResponseType apiResponse,
MediaTypeCollection
declaredContentTypes, IEnumerable<IApiResponseTypeMetadataProvider>? responseTypeMetadataProviders, IModelMetadataProvider? modelMetadataProvider)
DefaultApiDescriptionProvider.cs (4)
136
var
contentTypes = GetDeclaredContentTypes(requestMetadataAttributes, acceptsMetadata);
433
private IReadOnlyList<ApiRequestFormat> GetSupportedFormats(
MediaTypeCollection
contentTypes, Type type)
470
internal static
MediaTypeCollection
GetDeclaredContentTypes(IReadOnlyList<IApiRequestMetadataProvider>? requestMetadataAttributes, IAcceptsMetadata? acceptsMetadata)
472
var
contentTypes = new MediaTypeCollection();
EndpointMetadataApiDescriptionProvider.cs (1)
334
var
contentTypes = new MediaTypeCollection();
Microsoft.AspNetCore.Mvc.Core (48)
_generated\0\LoggerMessage.g.cs (9)
429
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, string, global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeCollection
, global::System.Exception?> __ActionDoesNotSupportFormatFilterContentTypeCallback =
430
global::Microsoft.Extensions.Logging.LoggerMessage.Define<string, global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeCollection
>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(2, "ActionDoesNotSupportFormatFilterContentType"), "Current action does not support the content type '{FormatFilterContentType}'. The supported content types are '{SupportedMediaTypes}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
437
public static partial void ActionDoesNotSupportFormatFilterContentType(global::Microsoft.Extensions.Logging.ILogger logger, string formatFilterContentType, global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeCollection
supportedMediaTypes)
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)
865
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeCollection
, global::System.Exception?> __SelectingOutputFormatterUsingContentTypesCallback =
866
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeCollection
>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(9, "SelectingOutputFormatterUsingContentTypes"), "Attempting to select the first output formatter in the output formatters list which supports a content type from the explicitly specified content types '{ExplicitContentTypes}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
873
public static partial void SelectingOutputFormatterUsingContentTypes(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Mvc.Formatters.
MediaTypeCollection
explicitContentTypes)
ApiExplorer\IApiRequestMetadataProvider.cs (2)
17
/// <param name="contentTypes">The <see cref="
MediaTypeCollection
"/></param>
18
void SetContentTypes(
MediaTypeCollection
contentTypes);
ApiExplorer\IApiResponseMetadataProvider.cs (1)
33
void SetContentTypes(
MediaTypeCollection
contentTypes);
ConsumesAttribute.cs (4)
89
public
MediaTypeCollection
ContentTypes { get; set; }
236
private static
MediaTypeCollection
GetContentTypes(string firstArg, string[] args)
241
var
contentTypes = new MediaTypeCollection();
269
public void SetContentTypes(
MediaTypeCollection
contentTypes)
Formatters\FormatFilter.cs (3)
84
var
supportedMediaTypes = new MediaTypeCollection();
108
private static bool IsSuperSetOfAnySupportedMediaType(string contentType,
MediaTypeCollection
supportedMediaTypes)
176
public static partial void ActionDoesNotSupportFormatFilterContentType(ILogger logger, string formatFilterContentType,
MediaTypeCollection
supportedMediaTypes);
Formatters\InputFormatter.cs (1)
19
public
MediaTypeCollection
SupportedMediaTypes { get; } = new MediaTypeCollection();
Formatters\MediaTypeCollection.cs (5)
15
/// Adds an object to the end of the <see cref="
MediaTypeCollection
"/>.
17
/// <param name="item">The media type to be added to the end of the <see cref="
MediaTypeCollection
"/>.</param>
26
/// Inserts an element into the <see cref="
MediaTypeCollection
"/> at the specified index.
43
/// Removes the first occurrence of a specific media type from the <see cref="
MediaTypeCollection
"/>.
48
/// <see cref="
MediaTypeCollection
"/>.</returns>
Formatters\OutputFormatter.cs (1)
19
public
MediaTypeCollection
SupportedMediaTypes { get; } = new MediaTypeCollection();
Infrastructure\DefaultApiProblemDetailsWriter.cs (1)
17
private static readonly
MediaTypeCollection
_problemContentTypes = new()
Infrastructure\DefaultOutputFormatterSelector.cs (6)
50
public override IOutputFormatter? SelectFormatter(OutputFormatterCanWriteContext context, IList<IOutputFormatter> formatters,
MediaTypeCollection
contentTypes)
216
MediaTypeCollection
acceptableContentTypes)
239
MediaTypeCollection
possibleOutputContentTypes)
266
private static void ValidateContentTypes(
MediaTypeCollection
contentTypes)
310
public static partial void SelectingOutputFormatterUsingAcceptHeaderAndExplicitContentTypes(ILogger logger, IEnumerable<MediaTypeSegmentWithQuality> acceptHeader,
MediaTypeCollection
explicitContentTypes);
316
public static partial void SelectingOutputFormatterUsingContentTypes(ILogger logger,
MediaTypeCollection
explicitContentTypes);
Infrastructure\ObjectResultExecutor.cs (1)
170
public static void NoFormatter(ILogger logger, OutputFormatterCanWriteContext context,
MediaTypeCollection
contentTypes)
Infrastructure\OutputFormatterSelector.cs (1)
33
public abstract IOutputFormatter? SelectFormatter(OutputFormatterCanWriteContext context, IList<IOutputFormatter> formatters,
MediaTypeCollection
mediaTypes);
ObjectResult.cs (3)
16
private
MediaTypeCollection
_contentTypes;
41
/// Gets or sets the <see cref="
MediaTypeCollection
"/>.
43
public
MediaTypeCollection
ContentTypes
ProducesAttribute.cs (4)
61
public
MediaTypeCollection
ContentTypes { get; set; }
98
public void SetContentTypes(
MediaTypeCollection
contentTypes)
107
private static
MediaTypeCollection
GetContentTypes(string firstArg, string[] args)
112
var
contentTypes = new MediaTypeCollection();
ProducesDefaultResponseTypeAttribute.cs (1)
48
void IApiResponseMetadataProvider.SetContentTypes(
MediaTypeCollection
contentTypes)
ProducesResponseTypeAttribute.cs (5)
17
private readonly
MediaTypeCollection
? _contentTypes;
88
internal
MediaTypeCollection
? ContentTypes => _contentTypes;
96
void IApiResponseMetadataProvider.SetContentTypes(
MediaTypeCollection
contentTypes)
108
private static
MediaTypeCollection
GetContentTypes(string contentType, string[] additionalContentTypes)
113
MediaTypeCollection
contentTypes = new();