15 instantiations of MediaTypeCollection
Microsoft.AspNetCore.Mvc.ApiExplorer (6)
ApiResponseTypeProvider.cs (3)
96var contentTypes = new MediaTypeCollection(); 262var attributeContentTypes = new MediaTypeCollection(); 339var attributeContentTypes = new MediaTypeCollection();
DefaultApiDescriptionProvider.cs (2)
437contentTypes = new MediaTypeCollection 472var contentTypes = new MediaTypeCollection();
EndpointMetadataApiDescriptionProvider.cs (1)
334var contentTypes = new MediaTypeCollection();
Microsoft.AspNetCore.Mvc.Core (9)
ConsumesAttribute.cs (1)
241var contentTypes = new MediaTypeCollection();
Formatters\FormatFilter.cs (1)
84var supportedMediaTypes = new MediaTypeCollection();
Formatters\InputFormatter.cs (1)
19public MediaTypeCollection SupportedMediaTypes { get; } = new MediaTypeCollection();
Formatters\OutputFormatter.cs (1)
19public MediaTypeCollection SupportedMediaTypes { get; } = new MediaTypeCollection();
Infrastructure\DefaultApiProblemDetailsWriter.cs (1)
17private static readonly MediaTypeCollection _problemContentTypes = new()
ObjectResult.cs (1)
26_contentTypes = new MediaTypeCollection();
ProducesAttribute.cs (2)
28ContentTypes = new MediaTypeCollection(); 112var contentTypes = new MediaTypeCollection();
ProducesResponseTypeAttribute.cs (1)
113MediaTypeCollection contentTypes = new();
59 references to MediaTypeCollection
Microsoft.AspNetCore.Mvc.ApiExplorer (11)
ApiResponseTypeProvider.cs (6)
96var contentTypes = new MediaTypeCollection(); 163MediaTypeCollection contentTypes, 187MediaTypeCollection contentTypes, 262var attributeContentTypes = new MediaTypeCollection(); 339var attributeContentTypes = new MediaTypeCollection(); 374internal static void CalculateResponseFormatForType(ApiResponseType apiResponse, MediaTypeCollection declaredContentTypes, IEnumerable<IApiResponseTypeMetadataProvider>? responseTypeMetadataProviders, IModelMetadataProvider? modelMetadataProvider)
DefaultApiDescriptionProvider.cs (4)
136var contentTypes = GetDeclaredContentTypes(requestMetadataAttributes, acceptsMetadata); 433private IReadOnlyList<ApiRequestFormat> GetSupportedFormats(MediaTypeCollection contentTypes, Type type) 470internal static MediaTypeCollection GetDeclaredContentTypes(IReadOnlyList<IApiRequestMetadataProvider>? requestMetadataAttributes, IAcceptsMetadata? acceptsMetadata) 472var contentTypes = new MediaTypeCollection();
EndpointMetadataApiDescriptionProvider.cs (1)
334var contentTypes = new MediaTypeCollection();
Microsoft.AspNetCore.Mvc.Core (48)
_generated\0\LoggerMessage.g.cs (9)
429private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, string, global::Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection, global::System.Exception?> __ActionDoesNotSupportFormatFilterContentTypeCallback = 430global::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 }); 437public static partial void ActionDoesNotSupportFormatFilterContentType(global::Microsoft.Extensions.Logging.ILogger logger, string formatFilterContentType, global::Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection supportedMediaTypes) 833private 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 = 834global::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 }); 841public 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) 865private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection, global::System.Exception?> __SelectingOutputFormatterUsingContentTypesCallback = 866global::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 }); 873public 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> 18void SetContentTypes(MediaTypeCollection contentTypes);
ApiExplorer\IApiResponseMetadataProvider.cs (1)
33void SetContentTypes(MediaTypeCollection contentTypes);
ConsumesAttribute.cs (4)
89public MediaTypeCollection ContentTypes { get; set; } 236private static MediaTypeCollection GetContentTypes(string firstArg, string[] args) 241var contentTypes = new MediaTypeCollection(); 269public void SetContentTypes(MediaTypeCollection contentTypes)
Formatters\FormatFilter.cs (3)
84var supportedMediaTypes = new MediaTypeCollection(); 108private static bool IsSuperSetOfAnySupportedMediaType(string contentType, MediaTypeCollection supportedMediaTypes) 176public static partial void ActionDoesNotSupportFormatFilterContentType(ILogger logger, string formatFilterContentType, MediaTypeCollection supportedMediaTypes);
Formatters\InputFormatter.cs (1)
19public 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)
19public MediaTypeCollection SupportedMediaTypes { get; } = new MediaTypeCollection();
Infrastructure\DefaultApiProblemDetailsWriter.cs (1)
17private static readonly MediaTypeCollection _problemContentTypes = new()
Infrastructure\DefaultOutputFormatterSelector.cs (6)
50public override IOutputFormatter? SelectFormatter(OutputFormatterCanWriteContext context, IList<IOutputFormatter> formatters, MediaTypeCollection contentTypes) 216MediaTypeCollection acceptableContentTypes) 239MediaTypeCollection possibleOutputContentTypes) 266private static void ValidateContentTypes(MediaTypeCollection contentTypes) 310public static partial void SelectingOutputFormatterUsingAcceptHeaderAndExplicitContentTypes(ILogger logger, IEnumerable<MediaTypeSegmentWithQuality> acceptHeader, MediaTypeCollection explicitContentTypes); 316public static partial void SelectingOutputFormatterUsingContentTypes(ILogger logger, MediaTypeCollection explicitContentTypes);
Infrastructure\ObjectResultExecutor.cs (1)
170public static void NoFormatter(ILogger logger, OutputFormatterCanWriteContext context, MediaTypeCollection contentTypes)
Infrastructure\OutputFormatterSelector.cs (1)
33public abstract IOutputFormatter? SelectFormatter(OutputFormatterCanWriteContext context, IList<IOutputFormatter> formatters, MediaTypeCollection mediaTypes);
ObjectResult.cs (3)
16private MediaTypeCollection _contentTypes; 41/// Gets or sets the <see cref="MediaTypeCollection"/>. 43public MediaTypeCollection ContentTypes
ProducesAttribute.cs (4)
61public MediaTypeCollection ContentTypes { get; set; } 98public void SetContentTypes(MediaTypeCollection contentTypes) 107private static MediaTypeCollection GetContentTypes(string firstArg, string[] args) 112var contentTypes = new MediaTypeCollection();
ProducesDefaultResponseTypeAttribute.cs (1)
48void IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection contentTypes)
ProducesResponseTypeAttribute.cs (5)
17private readonly MediaTypeCollection? _contentTypes; 88internal MediaTypeCollection? ContentTypes => _contentTypes; 96void IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection contentTypes) 108private static MediaTypeCollection GetContentTypes(string contentType, string[] additionalContentTypes) 113MediaTypeCollection contentTypes = new();