3 implementations of IOutputFormatter
Microsoft.AspNetCore.Mvc.Core (3)
Formatters\HttpNoContentOutputFormatter.cs (1)
11public class HttpNoContentOutputFormatter : IOutputFormatter
Formatters\OutputFormatter.cs (1)
13public abstract class OutputFormatter : IOutputFormatter, IApiResponseTypeMetadataProvider
Formatters\StreamOutputFormatter.cs (1)
10public class StreamOutputFormatter : IOutputFormatter
55 references to IOutputFormatter
Microsoft.AspNetCore.Mvc.Abstractions (8)
ApiExplorer\ApiResponseFormat.cs (1)
16public IOutputFormatter Formatter { get; set; } = default!;
Formatters\IOutputFormatter.cs (1)
12/// Determines whether this <see cref="IOutputFormatter"/> can serialize
Formatters\OutputFormatterCanWriteContext.cs (5)
10/// A context object for <see cref="IOutputFormatter.CanWriteResult(OutputFormatterCanWriteContext)"/>. 34/// An <see cref="IOutputFormatter"/> can set this value when its 35/// <see cref="IOutputFormatter.CanWriteResult(OutputFormatterCanWriteContext)"/> method is called, 37/// <see cref="IOutputFormatter.WriteAsync(OutputFormatterWriteContext)"/> 43/// This allows <see cref="IOutputFormatter.CanWriteResult(OutputFormatterCanWriteContext)"/> to
Formatters\OutputFormatterWriteContext.cs (1)
10/// A context object for <see cref="IOutputFormatter.WriteAsync(OutputFormatterWriteContext)"/>.
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
ApiResponseTypeProvider.cs (1)
423Formatter = (IOutputFormatter)responseTypeMetadataProvider,
Microsoft.AspNetCore.Mvc.Core (46)
_generated\0\LoggerMessage.g.cs (6)
772private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter, string?, global::System.Exception?> __FormatterSelectedCallback = 773global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter, string?>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(2, "FormatterSelected"), "Selected output formatter '{OutputFormatter}' and content type '{ContentType}' to write the response.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 780public static partial void FormatterSelected(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter outputFormatter, string? contentType) 897private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Collections.Generic.IEnumerable<global::Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter>, global::System.Exception?> __RegisteredOutputFormattersCallback = 898global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Collections.Generic.IEnumerable<global::Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter>>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(11, "RegisteredOutputFormatters"), "List of registered output formatters, in the following order: {OutputFormatters}", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 905public static partial void RegisteredOutputFormatters(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Collections.Generic.IEnumerable<global::Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter> outputFormatters)
ApiExplorer\IApiResponseTypeMetadataProvider.cs (3)
10/// An <see cref="Formatters.IOutputFormatter"/> should implement this interface to expose metadata information 16/// Gets a filtered list of content types which are supported by the <see cref="Formatters.IOutputFormatter"/> 26/// <returns>Content types which are supported by the <see cref="Formatters.IOutputFormatter"/>.</returns>
Infrastructure\DefaultApiProblemDetailsWriter.cs (2)
78var selectedFormatter = _formatterSelector.SelectFormatter( 80Array.Empty<IOutputFormatter>(),
Infrastructure\DefaultOutputFormatterSelector.cs (21)
28private readonly IList<IOutputFormatter> _formatters; 44_formatters = new ReadOnlyCollection<IOutputFormatter>(options.Value.OutputFormatters); 50public override IOutputFormatter? SelectFormatter(OutputFormatterCanWriteContext context, IList<IOutputFormatter> formatters, MediaTypeCollection contentTypes) 66typeof(IOutputFormatter).FullName)); 76IOutputFormatter? selectedFormatter = null; 168private IOutputFormatter? SelectFormatterNotUsingContentType( 170IList<IOutputFormatter> formatters) 174foreach (var formatter in formatters) 188private static IOutputFormatter? SelectFormatterUsingSortedAcceptHeaders( 190IList<IOutputFormatter> formatters, 202var formatter = formatters[j]; 213private static IOutputFormatter? SelectFormatterUsingAnyAcceptableContentType( 215IList<IOutputFormatter> formatters, 218foreach (var formatter in formatters) 235private static IOutputFormatter? SelectFormatterUsingSortedAcceptHeadersAndContentTypes( 237IList<IOutputFormatter> formatters, 251var formatter = formatters[k]; 287IOutputFormatter outputFormatter, 298public static partial void FormatterSelected(ILogger logger, IOutputFormatter outputFormatter, string? contentType); 322public static partial void RegisteredOutputFormatters(ILogger logger, IEnumerable<IOutputFormatter> outputFormatters);
Infrastructure\ObjectResultExecutor.cs (3)
92var selectedFormatter = FormatterSelector.SelectFormatter( 94(IList<IOutputFormatter>)result.Formatters ?? Array.Empty<IOutputFormatter>(),
Infrastructure\OutputFormatterSelector.cs (5)
9/// Selects an <see cref="IOutputFormatter"/> to write a response to the current request. 27/// Selects an <see cref="IOutputFormatter"/> to write the response based on the provided values and the current request. 32/// <returns>The selected <see cref="IOutputFormatter"/>, or <c>null</c> if one could not be selected.</returns> 33public abstract IOutputFormatter? SelectFormatter(OutputFormatterCanWriteContext context, IList<IOutputFormatter> formatters, MediaTypeCollection mediaTypes);
MvcOptions.cs (3)
45OutputFormatters = new FormatterCollection<IOutputFormatter>(); 195/// Gets a list of <see cref="IOutputFormatter"/>s that are used by this application. 197public FormatterCollection<IOutputFormatter> OutputFormatters { get; }
ObjectResult.cs (3)
25Formatters = new FormatterCollection<IOutputFormatter>(); 36/// The collection of <see cref="IOutputFormatter"/>. 38public FormatterCollection<IOutputFormatter> Formatters { get; set; }