12 references to GetMediaTypeMappingForFormat
Microsoft.AspNetCore.Mvc.Core (2)
Formatters\FormatFilter.cs (2)
72var contentType = _options.FormatterMappings.GetMediaTypeMappingForFormat(format); 157var contentType = _options.FormatterMappings.GetMediaTypeMappingForFormat(format);
Microsoft.AspNetCore.Mvc.Core.Test (3)
Formatters\FormatterMappingsTest.cs (3)
20Assert.Throws<ArgumentException>("format", () => options.GetMediaTypeMappingForFormat(format)); 36var returnMediaType = options.GetMediaTypeMappingForFormat(getFormat); 125Assert.Null(options.GetMediaTypeMappingForFormat(format));
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
DependencyInjection\XmlDataContractSerializerMvcOptionsSetup.cs (1)
49var mapping = options.FormatterMappings.GetMediaTypeMappingForFormat(key);
DependencyInjection\XmlSerializerMvcOptionsSetup.cs (1)
37var mapping = options.FormatterMappings.GetMediaTypeMappingForFormat(key);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (4)
DependencyInjection\XmlDataContractSerializerMvcOptionsSetupTest.cs (2)
23var mappedContentType = options.FormatterMappings.GetMediaTypeMappingForFormat("xml"); 39var mappedContentType = options.FormatterMappings.GetMediaTypeMappingForFormat("xml");
DependencyInjection\XmlSerializerMvcOptionsSetupTest.cs (2)
23var mappedContentType = options.FormatterMappings.GetMediaTypeMappingForFormat("xml"); 39var mappedContentType = options.FormatterMappings.GetMediaTypeMappingForFormat("xml");
Microsoft.AspNetCore.Mvc.Test (1)
MvcOptionsSetupTest.cs (1)
117var mapping = options.FormatterMappings.GetMediaTypeMappingForFormat("json");