130 references to MediaTypeNames
Microsoft.AspNetCore.Components.WebAssembly.Server (7)
ComponentsWebAssemblyApplicationBuilderExtensions.cs (7)
89
AddMapping(contentTypeProvider, ".dll",
MediaTypeNames
.Application.Octet);
90
AddMapping(contentTypeProvider, ".webcil",
MediaTypeNames
.Application.Octet);
93
AddMapping(contentTypeProvider, ".pdb",
MediaTypeNames
.Application.Octet);
94
AddMapping(contentTypeProvider, ".br",
MediaTypeNames
.Application.Octet);
95
AddMapping(contentTypeProvider, ".dat",
MediaTypeNames
.Application.Octet);
96
AddMapping(contentTypeProvider, ".blat",
MediaTypeNames
.Application.Octet);
97
AddMapping(contentTypeProvider, ".mjs",
MediaTypeNames
.Text.JavaScript);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (22)
Logging\AcceptanceTests.cs (18)
116
context.Response.ContentType =
MediaTypeNames
.Text.Plain;
133
context.Response.ContentType =
MediaTypeNames
.Text.Plain;
198
[InlineData(
MediaTypeNames
.Text.Plain, true)]
199
[InlineData(
MediaTypeNames
.Text.Html, false)]
200
[InlineData(
MediaTypeNames
.Text.RichText, false)]
201
[InlineData(
MediaTypeNames
.Text.Xml, false)]
255
[InlineData(
MediaTypeNames
.Text.Plain, true)]
256
[InlineData(
MediaTypeNames
.Text.Html, true)]
257
[InlineData(
MediaTypeNames
.Text.RichText, true)]
258
[InlineData(
MediaTypeNames
.Text.Xml, true)]
259
[InlineData(
MediaTypeNames
.Application.Json, false)]
260
[InlineData(
MediaTypeNames
.Application.Xml, false)]
261
[InlineData(
MediaTypeNames
.Image.Jpeg, false)]
329
using var content = new StringContent(Content, null,
MediaTypeNames
.Text.Html);
369
x.MediaTypeOptions.AddText(
MediaTypeNames
.Text.Plain);
383
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(
MediaTypeNames
.Application.Json));
443
httpMessage.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(
MediaTypeNames
.Application.Json));
685
x.MediaTypeOptions.AddText(
MediaTypeNames
.Text.Plain);
Logging\HeaderReaderTests.cs (4)
22
var headers = new HeaderDictionary(new Dictionary<string, StringValues> { [HeaderNames.Accept] =
MediaTypeNames
.Text.Plain });
52
[HeaderNames.AcceptCharset] =
MediaTypeNames
.Text.Xml,
53
[HeaderNames.ContentType] =
MediaTypeNames
.Application.Pdf
63
Assert.Equal($"<redacted:{
MediaTypeNames
.Text.Xml}>", redacted.Value);
Microsoft.AspNetCore.Http.Extensions.Tests (3)
ValidationFilterEndpointFactoryTests.cs (3)
52
Assert.StartsWith(
MediaTypeNames
.Application.Json, context.Response.ContentType, StringComparison.OrdinalIgnoreCase);
99
Assert.StartsWith(
MediaTypeNames
.Application.ProblemJson, context.Response.ContentType, StringComparison.OrdinalIgnoreCase);
157
Assert.StartsWith(
MediaTypeNames
.Application.ProblemJson, context.Response.ContentType, StringComparison.OrdinalIgnoreCase);
Microsoft.AspNetCore.Routing (1)
ValidationEndpointFilterFactory.cs (1)
117
context.HttpContext.Response.ContentType =
MediaTypeNames
.Application.ProblemJson;
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (1)
MultipartReaderBenchmark.cs (1)
8
using static System.Net.Mime.
MediaTypeNames
;
Microsoft.Extensions.AI.Abstractions.Tests (1)
ChatCompletion\ChatMessageTests.cs (1)
9
using static System.Net.Mime.
MediaTypeNames
;
Microsoft.Extensions.Http.Diagnostics.Tests (16)
Logging\HttpHeadersReaderTest.cs (3)
132
requestContent.Headers.ContentType = new(
MediaTypeNames
.Application.Soap);
141
responseContent.Headers.ContentType = new(
MediaTypeNames
.Text.Html);
154
expectedRequest.Add(new KeyValuePair<string, string>("Content-Type",
MediaTypeNames
.Application.Soap));
Logging\HttpRequestReaderTest.cs (13)
63
RequestBodyContentTypes = new HashSet<string> {
MediaTypeNames
.Text.Plain },
64
ResponseBodyContentTypes = new HashSet<string> {
MediaTypeNames
.Text.Plain },
189
RequestBodyContentTypes = new HashSet<string> {
MediaTypeNames
.Text.Plain },
190
ResponseBodyContentTypes = new HashSet<string> {
MediaTypeNames
.Text.Plain },
263
RequestBodyContentTypes = new HashSet<string> {
MediaTypeNames
.Text.Plain },
264
ResponseBodyContentTypes = new HashSet<string> {
MediaTypeNames
.Text.Plain },
336
RequestBodyContentTypes = new HashSet<string> {
MediaTypeNames
.Text.Plain },
394
RequestBodyContentTypes = new HashSet<string> {
MediaTypeNames
.Text.Plain },
395
ResponseBodyContentTypes = new HashSet<string> {
MediaTypeNames
.Text.Plain },
465
RequestBodyContentTypes = new HashSet<string> {
MediaTypeNames
.Text.Plain },
466
ResponseBodyContentTypes = new HashSet<string> {
MediaTypeNames
.Text.Plain },
532
RequestBodyContentTypes = new HashSet<string> {
MediaTypeNames
.Text.Plain },
533
ResponseBodyContentTypes = new HashSet<string> {
MediaTypeNames
.Text.Plain },
Microsoft.ML.Tokenizers.Tests (1)
BpeTests.cs (1)
18
using static System.Net.Mime.
MediaTypeNames
;
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
"/>
153
/// <param name="mediaType">MIME type of this data, e.g. <see cref="
MediaTypeNames
.Application.Octet"/>.</param>
154
/// <seealso cref="
MediaTypeNames
"/>
174
/// <param name="mediaType">MIME type of this data, e.g. <see cref="
MediaTypeNames
.Application.Octet"/>.</param>
176
/// <seealso cref="
MediaTypeNames
"/>
193
/// <param name="mediaType">MIME type of this data, e.g. <see cref="
MediaTypeNames
.Application.Octet"/>.</param>
195
/// <seealso cref="
MediaTypeNames
"/>
213
/// <param name="mediaType">MIME type of this data, e.g. <see cref="
MediaTypeNames
.Text.Plain"/>.</param>
215
/// <seealso cref="
MediaTypeNames
"/>
233
/// <param name="mediaType">MIME type of this data, e.g. <see cref="
MediaTypeNames
.Application.Octet"/>.</param>
235
/// <seealso cref="
MediaTypeNames
"/>
259
/// <param name="mediaType">MIME type of this data, e.g. <see cref="
MediaTypeNames
.Application.Octet"/>.</param>
262
/// <seealso cref="
MediaTypeNames
"/>
321
/// <param name="mediaType">MIME type of this data, e.g. <see cref="
MediaTypeNames
.Application.Octet"/>.</param>
323
/// <seealso cref="
MediaTypeNames
"/>
345
/// <param name="mediaType">MIME type of this data, e.g. <see cref="
MediaTypeNames
.Application.Octet"/>.</param>
348
/// <seealso cref="
MediaTypeNames
"/>
378
/// <seealso cref="
MediaTypeNames
"/>
393
/// <seealso cref="
MediaTypeNames
"/>
402
/// <seealso cref="
MediaTypeNames
"/>
System.Net.Mail (49)
System\Net\Mail\Attachment.cs (1)
129
mediaType =
MediaTypeNames
.Text.Plain;
System\Net\Mail\MailMessage.cs (2)
328
_bodyView = AlternateView.CreateAlternateViewFromString(_body, _bodyEncoding, (_isBodyHtml ?
MediaTypeNames
.Text.Html : null));
338
_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>