3 implementations of IOutputFormatter
Microsoft.AspNetCore.Mvc.Core (3)
Formatters\HttpNoContentOutputFormatter.cs (1)
11
public class HttpNoContentOutputFormatter :
IOutputFormatter
Formatters\OutputFormatter.cs (1)
13
public abstract class OutputFormatter :
IOutputFormatter
, IApiResponseTypeMetadataProvider
Formatters\StreamOutputFormatter.cs (1)
10
public class StreamOutputFormatter :
IOutputFormatter
55 references to IOutputFormatter
Microsoft.AspNetCore.Mvc.Abstractions (8)
ApiExplorer\ApiResponseFormat.cs (1)
16
public
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)
423
Formatter = (
IOutputFormatter
)responseTypeMetadataProvider,
Microsoft.AspNetCore.Mvc.Core (46)
_generated\0\LoggerMessage.g.cs (6)
772
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Mvc.Formatters.
IOutputFormatter
, string?, global::System.Exception?> __FormatterSelectedCallback =
773
global::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 });
780
public static partial void FormatterSelected(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Mvc.Formatters.
IOutputFormatter
outputFormatter, string? contentType)
897
private 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 =
898
global::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 });
905
public 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)
78
var
selectedFormatter = _formatterSelector.SelectFormatter(
80
Array.Empty<
IOutputFormatter
>(),
Infrastructure\DefaultOutputFormatterSelector.cs (21)
28
private readonly IList<
IOutputFormatter
> _formatters;
44
_formatters = new ReadOnlyCollection<
IOutputFormatter
>(options.Value.OutputFormatters);
50
public override
IOutputFormatter
? SelectFormatter(OutputFormatterCanWriteContext context, IList<
IOutputFormatter
> formatters, MediaTypeCollection contentTypes)
66
typeof(
IOutputFormatter
).FullName));
76
IOutputFormatter
? selectedFormatter = null;
168
private
IOutputFormatter
? SelectFormatterNotUsingContentType(
170
IList<
IOutputFormatter
> formatters)
174
foreach (
var
formatter in formatters)
188
private static
IOutputFormatter
? SelectFormatterUsingSortedAcceptHeaders(
190
IList<
IOutputFormatter
> formatters,
202
var
formatter = formatters[j];
213
private static
IOutputFormatter
? SelectFormatterUsingAnyAcceptableContentType(
215
IList<
IOutputFormatter
> formatters,
218
foreach (
var
formatter in formatters)
235
private static
IOutputFormatter
? SelectFormatterUsingSortedAcceptHeadersAndContentTypes(
237
IList<
IOutputFormatter
> formatters,
251
var
formatter = formatters[k];
287
IOutputFormatter
outputFormatter,
298
public static partial void FormatterSelected(ILogger logger,
IOutputFormatter
outputFormatter, string? contentType);
322
public static partial void RegisteredOutputFormatters(ILogger logger, IEnumerable<
IOutputFormatter
> outputFormatters);
Infrastructure\ObjectResultExecutor.cs (3)
92
var
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>
33
public abstract
IOutputFormatter
? SelectFormatter(OutputFormatterCanWriteContext context, IList<
IOutputFormatter
> formatters, MediaTypeCollection mediaTypes);
MvcOptions.cs (3)
45
OutputFormatters = new FormatterCollection<
IOutputFormatter
>();
195
/// Gets a list of <see cref="
IOutputFormatter
"/>s that are used by this application.
197
public FormatterCollection<
IOutputFormatter
> OutputFormatters { get; }
ObjectResult.cs (3)
25
Formatters = new FormatterCollection<
IOutputFormatter
>();
36
/// The collection of <see cref="
IOutputFormatter
"/>.
38
public FormatterCollection<
IOutputFormatter
> Formatters { get; set; }