123 references to MediaTypeNames
Microsoft.AspNetCore.Components.WebAssembly.Server (7)
ComponentsWebAssemblyApplicationBuilderExtensions.cs (7)
89AddMapping(contentTypeProvider, ".dll", MediaTypeNames.Application.Octet); 90AddMapping(contentTypeProvider, ".webcil", MediaTypeNames.Application.Octet); 93AddMapping(contentTypeProvider, ".pdb", MediaTypeNames.Application.Octet); 94AddMapping(contentTypeProvider, ".br", MediaTypeNames.Application.Octet); 95AddMapping(contentTypeProvider, ".dat", MediaTypeNames.Application.Octet); 96AddMapping(contentTypeProvider, ".blat", MediaTypeNames.Application.Octet); 97AddMapping(contentTypeProvider, ".mjs", MediaTypeNames.Text.JavaScript);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (21)
Logging\AcceptanceTests.cs (17)
72context.Response.ContentType = MediaTypeNames.Text.Plain; 89context.Response.ContentType = MediaTypeNames.Text.Plain; 154[InlineData(MediaTypeNames.Text.Plain, true)] 155[InlineData(MediaTypeNames.Text.Html, false)] 156[InlineData(MediaTypeNames.Text.RichText, false)] 157[InlineData(MediaTypeNames.Text.Xml, false)] 211[InlineData(MediaTypeNames.Text.Plain, true)] 212[InlineData(MediaTypeNames.Text.Html, true)] 213[InlineData(MediaTypeNames.Text.RichText, true)] 214[InlineData(MediaTypeNames.Text.Xml, true)] 215[InlineData(MediaTypeNames.Application.Json, false)] 216[InlineData(MediaTypeNames.Application.Xml, false)] 217[InlineData(MediaTypeNames.Image.Jpeg, false)] 283x.MediaTypeOptions.AddText(MediaTypeNames.Text.Plain); 297request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(MediaTypeNames.Application.Json)); 357httpMessage.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(MediaTypeNames.Application.Json)); 599x.MediaTypeOptions.AddText(MediaTypeNames.Text.Plain);
Logging\HeaderReaderTests.cs (4)
22var headers = new HeaderDictionary(new Dictionary<string, StringValues> { [HeaderNames.Accept] = MediaTypeNames.Text.Plain }); 52[HeaderNames.AcceptCharset] = MediaTypeNames.Text.Xml, 53[HeaderNames.ContentType] = MediaTypeNames.Application.Pdf 63Assert.Equal($"<redacted:{MediaTypeNames.Text.Xml}>", redacted.Value);
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (1)
MultipartReaderBenchmark.cs (1)
8using static System.Net.Mime.MediaTypeNames;
Microsoft.Extensions.Http.Diagnostics.Tests (16)
Logging\HttpHeadersReaderTest.cs (3)
132requestContent.Headers.ContentType = new(MediaTypeNames.Application.Soap); 141responseContent.Headers.ContentType = new(MediaTypeNames.Text.Html); 154expectedRequest.Add(new KeyValuePair<string, string>("Content-Type", MediaTypeNames.Application.Soap));
Logging\HttpRequestReaderTest.cs (13)
63RequestBodyContentTypes = new HashSet<string> { MediaTypeNames.Text.Plain }, 64ResponseBodyContentTypes = new HashSet<string> { MediaTypeNames.Text.Plain }, 189RequestBodyContentTypes = new HashSet<string> { MediaTypeNames.Text.Plain }, 190ResponseBodyContentTypes = new HashSet<string> { MediaTypeNames.Text.Plain }, 263RequestBodyContentTypes = new HashSet<string> { MediaTypeNames.Text.Plain }, 264ResponseBodyContentTypes = new HashSet<string> { MediaTypeNames.Text.Plain }, 336RequestBodyContentTypes = new HashSet<string> { MediaTypeNames.Text.Plain }, 394RequestBodyContentTypes = new HashSet<string> { MediaTypeNames.Text.Plain }, 395ResponseBodyContentTypes = new HashSet<string> { MediaTypeNames.Text.Plain }, 465RequestBodyContentTypes = new HashSet<string> { MediaTypeNames.Text.Plain }, 466ResponseBodyContentTypes = new HashSet<string> { MediaTypeNames.Text.Plain }, 532RequestBodyContentTypes = new HashSet<string> { MediaTypeNames.Text.Plain }, 533ResponseBodyContentTypes = new HashSet<string> { MediaTypeNames.Text.Plain },
netstandard (1)
netstandard.cs (1)
1187[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Mime.MediaTypeNames))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
675[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Mime.MediaTypeNames))]
System.Memory.Data (27)
System\BinaryData.cs (27)
50/// Gets the MIME type of this data, e.g. <see cref="MediaTypeNames.Application.Octet"/>. 52/// <seealso cref="MediaTypeNames"/> 70/// <param name="mediaType">MIME type of this data, e.g. <see cref="MediaTypeNames.Application.Octet"/>.</param> 71/// <seealso cref="MediaTypeNames"/> 87/// <seealso cref="MediaTypeNames"/> 106/// <seealso cref="MediaTypeNames"/> 128/// <param name="mediaType">MIME type of this data, e.g. <see cref="MediaTypeNames.Application.Octet"/>.</param> 129/// <seealso cref="MediaTypeNames"/> 156/// <param name="mediaType">MIME type of this data, e.g. <see cref="MediaTypeNames.Application.Octet"/>.</param> 157/// <seealso cref="MediaTypeNames"/> 177/// <param name="mediaType">MIME type of this data, e.g. <see cref="MediaTypeNames.Application.Octet"/>.</param> 179/// <seealso cref="MediaTypeNames"/> 196/// <param name="mediaType">MIME type of this data, e.g. <see cref="MediaTypeNames.Application.Octet"/>.</param> 198/// <seealso cref="MediaTypeNames"/> 216/// <param name="mediaType">MIME type of this data, e.g. <see cref="MediaTypeNames.Text.Plain"/>.</param> 218/// <seealso cref="MediaTypeNames"/> 236/// <param name="mediaType">MIME type of this data, e.g. <see cref="MediaTypeNames.Application.Octet"/>.</param> 238/// <seealso cref="MediaTypeNames"/> 265/// <param name="mediaType">MIME type of this data, e.g. <see cref="MediaTypeNames.Application.Octet"/>.</param> 268/// <seealso cref="MediaTypeNames"/> 330/// <param name="mediaType">MIME type of this data, e.g. <see cref="MediaTypeNames.Application.Octet"/>.</param> 332/// <seealso cref="MediaTypeNames"/> 357/// <param name="mediaType">MIME type of this data, e.g. <see cref="MediaTypeNames.Application.Octet"/>.</param> 360/// <seealso cref="MediaTypeNames"/> 393/// <seealso cref="MediaTypeNames"/> 408/// <seealso cref="MediaTypeNames"/> 417/// <seealso cref="MediaTypeNames"/>
System.Net.Mail (49)
System\Net\Mail\Attachment.cs (1)
129mediaType = MediaTypeNames.Text.Plain;
System\Net\Mail\MailMessage.cs (2)
326_bodyView = AlternateView.CreateAlternateViewFromString(_body, _bodyEncoding, (_isBodyHtml ? MediaTypeNames.Text.Html : null)); 336_bodyView = AlternateView.CreateAlternateViewFromString(_body, _bodyEncoding, (_isBodyHtml ? MediaTypeNames.Text.Html : null));
System\Net\Mime\MediaTypeNames.cs (46)
11/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data consists of url-encoded key-value pairs.</summary> 14/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in gzip format.</summary> 17/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in JSON format.</summary> 20/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in JSON patch format.</summary> 23/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in JSON text sequence format.</summary> 26/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in Web Application Manifest.</summary> 29/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is not interpreted.</summary> 32/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in Portable Document Format (PDF).</summary> 35/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in JSON problem detail format.</summary> 38/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in XML problem detail format.</summary> 41/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in Rich Text Format (RTF).</summary> 44/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is a SOAP document.</summary> 47/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in WASM format.</summary> 50/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in XML format.</summary> 53/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in XML Document Type Definition format.</summary> 56/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in XML patch format.</summary> 59/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is compressed.</summary> 66/// <summary>Specifies that the <see cref="MediaTypeNames.Font"/> data is in font type collection format.</summary> 69/// <summary>Specifies that the <see cref="MediaTypeNames.Font"/> data is in OpenType Layout (OTF) format.</summary> 72/// <summary>Specifies that the <see cref="MediaTypeNames.Font"/> data is in SFNT format.</summary> 75/// <summary>Specifies that the <see cref="MediaTypeNames.Font"/> data is in TrueType font (TTF) format.</summary> 78/// <summary>Specifies that the <see cref="MediaTypeNames.Font"/> data is in WOFF format.</summary> 81/// <summary>Specifies that the <see cref="MediaTypeNames.Font"/> data is in WOFF2 format.</summary> 88/// <summary>Specifies that the <see cref="MediaTypeNames.Image"/> data is in AVIF format.</summary> 91/// <summary>Specifies that the <see cref="MediaTypeNames.Image"/> data is in BMP format.</summary> 94/// <summary>Specifies that the <see cref="MediaTypeNames.Image"/> data is in GIF format.</summary> 97/// <summary>Specifies that the <see cref="MediaTypeNames.Image"/> data is in ICO format.</summary> 100/// <summary>Specifies that the <see cref="MediaTypeNames.Image"/> data is in JPEG format.</summary> 103/// <summary>Specifies that the <see cref="MediaTypeNames.Image"/> data is in PNG format.</summary> 106/// <summary>Specifies that the <see cref="MediaTypeNames.Image"/> data is in SVG format.</summary> 109/// <summary>Specifies that the <see cref="MediaTypeNames.Image"/> data is in TIFF format.</summary> 112/// <summary>Specifies that the <see cref="MediaTypeNames.Image"/> data is in WEBP format.</summary> 119/// <summary>Specifies that the <see cref="MediaTypeNames.Multipart"/> data consists of multiple byte ranges.</summary> 122/// <summary>Specifies that the <see cref="MediaTypeNames.Multipart"/> data is in form data format.</summary> 125/// <summary>Specifies that the <see cref="MediaTypeNames.Multipart"/> data is in mixed format.</summary> 128/// <summary>Specifies that the <see cref="MediaTypeNames.Multipart"/> data is in related format.</summary> 135/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in CSS format.</summary> 138/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in CSV format.</summary> 141/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in event stream format.</summary> 144/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in HTML format.</summary> 147/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in JavaScript format.</summary> 150/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in Markdown format.</summary> 153/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in plain text format.</summary> 156/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in Rich Text Format (RTF).</summary> 159/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in Rich Text Format (RTF).</summary> 162/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in XML format.</summary>