19 references to SetMediaTypeMappingForFormat
Microsoft.AspNetCore.Mvc.Core (2)
Formatters\FormatterMappings.cs (1)
29
SetMediaTypeMappingForFormat
(format, MediaTypeHeaderValue.Parse(contentType));
Infrastructure\MvcCoreMvcOptionsSetup.cs (1)
74
options.FormatterMappings.
SetMediaTypeMappingForFormat
("json", MediaTypeHeaderValues.ApplicationJson);
Microsoft.AspNetCore.Mvc.Core.Test (13)
Formatters\FormatFilterTest.cs (5)
117
mockObjects.MvcOptions.FormatterMappings.
SetMediaTypeMappingForFormat
(
200
mockObjects.MvcOptions.FormatterMappings.
SetMediaTypeMappingForFormat
(
221
mockObjects.MvcOptions.FormatterMappings.
SetMediaTypeMappingForFormat
(
247
mockObjects.MvcOptions.FormatterMappings.
SetMediaTypeMappingForFormat
(
468
MvcOptions.FormatterMappings.
SetMediaTypeMappingForFormat
(
Formatters\FormatterMappingsTest.cs (8)
33
options.
SetMediaTypeMappingForFormat
(setFormat, MediaTypeHeaderValue.Parse(contentType));
53
() => options.
SetMediaTypeMappingForFormat
(
70
() => options.
SetMediaTypeMappingForFormat
(
90
() => options.
SetMediaTypeMappingForFormat
(
112
options.
SetMediaTypeMappingForFormat
("xml", mediaType);
114
options.
SetMediaTypeMappingForFormat
("json", mediaType);
116
options.
SetMediaTypeMappingForFormat
("foo", mediaType);
118
options.
SetMediaTypeMappingForFormat
("bar", mediaType);
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
DependencyInjection\XmlDataContractSerializerMvcOptionsSetup.cs (1)
52
options.FormatterMappings.
SetMediaTypeMappingForFormat
(
DependencyInjection\XmlSerializerMvcOptionsSetup.cs (1)
40
options.FormatterMappings.
SetMediaTypeMappingForFormat
(
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
DependencyInjection\NewtonsoftJsonMvcOptionsSetup.cs (1)
71
options.FormatterMappings.
SetMediaTypeMappingForFormat
("json", MediaTypeHeaderValues.ApplicationJson);
SimpleWebSite (1)
Startup.cs (1)
17
.AddFormatterMappings(m => m.
SetMediaTypeMappingForFormat
("js", new MediaTypeHeaderValue("application/json")))