4 writes to OutputFormatters
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
ApiResponseTypeProviderTest.cs (1)
771OutputFormatters = { new TestOutputFormatter() },
Microsoft.AspNetCore.Mvc.Core (1)
MvcOptions.cs (1)
45OutputFormatters = new FormatterCollection<IOutputFormatter>();
Microsoft.AspNetCore.Mvc.Core.Test (1)
Infrastructure\DefaultOutputFormatterSelectorTest.cs (1)
242OutputFormatters =
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiDocumentServiceTestsBase.cs (1)
61OutputFormatters = { new TestJsonOutputFormatter() }
50 references to OutputFormatters
ApiExplorerWebSite (2)
Startup.cs (2)
27options.OutputFormatters.Clear(); 28options.OutputFormatters.Add(new XmlDataContractSerializerOutputFormatter());
BasicWebSite (3)
Controllers\ContentNegotiation\FallbackOnTypeBasedMatchController.cs (3)
19_jsonOutputFormatter = mvcOptions.Value.OutputFormatters.OfType<NewtonsoftJsonOutputFormatter>().First(); 64foreach (var formatter in _mvcOptions.Value.OutputFormatters) 77foreach (var formatter in optionsAccessor.Value.OutputFormatters)
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
ApiResponseTypeProvider.cs (1)
82var responseTypeMetadataProviders = _mvcOptions.OutputFormatters.OfType<IApiResponseTypeMetadataProvider>();
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
DefaultApiDescriptionProviderTest.cs (1)
2235options.OutputFormatters.Add(formatter);
Microsoft.AspNetCore.Mvc.Core (8)
Infrastructure\DefaultOutputFormatterSelector.cs (2)
44_formatters = new ReadOnlyCollection<IOutputFormatter>(options.Value.OutputFormatters); 65nameof(MvcOptions.OutputFormatters),
Infrastructure\MvcCoreMvcOptionsSetup.cs (4)
77options.OutputFormatters.Add(new HttpNoContentOutputFormatter()); 78options.OutputFormatters.Add(new StringOutputFormatter()); 79options.OutputFormatters.Add(new StreamOutputFormatter()); 82options.OutputFormatters.Add(jsonOutputFormatter);
Infrastructure\OutputFormatterSelector.cs (2)
20/// <see cref="MvcOptions.OutputFormatters"/>, <see cref="MvcOptions.RespectBrowserAcceptHeader"/>, and 30/// <param name="formatters">A list of formatters to use; this acts as an override to <see cref="MvcOptions.OutputFormatters"/>.</param>
Microsoft.AspNetCore.Mvc.Core.Test (21)
AcceptedAtActionResultTests.cs (1)
269options.Value.OutputFormatters.Add(formatter.Object);
AcceptedAtRouteResultTests.cs (1)
177options.Value.OutputFormatters.Add(formatter.Object);
AcceptedResultTests.cs (1)
134options.Value.OutputFormatters.Add(formatter.Object);
CreatedAtActionResultTests.cs (2)
87options.Value.OutputFormatters.Add(new StringOutputFormatter()); 88options.Value.OutputFormatters.Add(SystemTextJsonOutputFormatter.CreateFormatter(new JsonOptions()));
CreatedAtRouteResultTests.cs (2)
101options.Value.OutputFormatters.Add(new StringOutputFormatter()); 102options.Value.OutputFormatters.Add(SystemTextJsonOutputFormatter.CreateFormatter(new JsonOptions()));
CreatedResultTests.cs (2)
134options.Value.OutputFormatters.Add(new StringOutputFormatter()); 135options.Value.OutputFormatters.Add(SystemTextJsonOutputFormatter.CreateFormatter(new JsonOptions()));
Formatters\FormatFilterTest.cs (3)
463MvcOptions.OutputFormatters.Add(new HttpNoContentOutputFormatter()); 464MvcOptions.OutputFormatters.Add(new StringOutputFormatter()); 465MvcOptions.OutputFormatters.Add(SystemTextJsonOutputFormatter.CreateFormatter(new JsonOptions()));
HttpNotFoundObjectResultTest.cs (2)
67options.Value.OutputFormatters.Add(new StringOutputFormatter()); 68options.Value.OutputFormatters.Add(SystemTextJsonOutputFormatter.CreateFormatter(new JsonOptions()));
HttpOkObjectResultTest.cs (2)
69options.Value.OutputFormatters.Add(new StringOutputFormatter()); 70options.Value.OutputFormatters.Add(SystemTextJsonOutputFormatter.CreateFormatter(new JsonOptions()));
Infrastructure\ControllerActionInvokerTest.cs (1)
1731options.Value.OutputFormatters.Add(formatter.Object);
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (1)
230mvcOptions.Value.OutputFormatters.Add(formatter);
Infrastructure\DefaultOutputFormatterSelectorTest.cs (1)
368options.OutputFormatters.Add(formatter);
Infrastructure\ObjectResultExecutorTest.cs (2)
284options.OutputFormatters.Add(new TestJsonOutputFormatter()); 308var expected = $"'{typeof(MvcOptions).FullName}.{nameof(MvcOptions.OutputFormatters)}' must not be " +
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
DependencyInjection\XmlDataContractSerializerMvcOptionsSetup.cs (1)
45options.OutputFormatters.Add(outputFormatter);
DependencyInjection\XmlSerializerMvcOptionsSetup.cs (1)
51options.OutputFormatters.Add(outputFormatter);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
DependencyInjection\XmlDataContractSerializerMvcOptionsSetupTest.cs (1)
68Assert.IsType<XmlDataContractSerializerOutputFormatter>(Assert.Single(options.OutputFormatters));
DependencyInjection\XmlSerializerMvcOptionsSetupTest.cs (1)
68Assert.IsType<XmlSerializerOutputFormatter>(Assert.Single(options.OutputFormatters));
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
DependencyInjection\NewtonsoftJsonMvcOptionsSetup.cs (2)
46options.OutputFormatters.RemoveType<SystemTextJsonOutputFormatter>(); 47options.OutputFormatters.Add(new NewtonsoftJsonOutputFormatter(_jsonOptions.SerializerSettings, _charPool, options, _jsonOptions));
Microsoft.AspNetCore.Mvc.Test (1)
MvcOptionsSetupTest.cs (1)
91Assert.Collection(options.OutputFormatters,
XmlFormattersWebSite (7)
Controllers\XmlDataContractApiController.cs (1)
27var xmlFormatter = mvcOptions.Value.OutputFormatters.OfType<XmlDataContractSerializerOutputFormatter>().First();
Controllers\XmlSerializedApiController.cs (1)
27var xmlFormatter = mvcOptions.Value.OutputFormatters.OfType<XmlSerializerOutputFormatter>().First();
Startup.cs (5)
51for (var i = options.OutputFormatters.Count - 1; i >= 0; i--) 53switch (options.OutputFormatters[i]) 64options.OutputFormatters.RemoveAt(i); 91options.OutputFormatters.Add(dcsOutputFormatter); 92options.OutputFormatters.Add(xmlSerializerOutputFormatter);