25 writes to Charset
Microsoft.AspNetCore.Http.Results.Tests (1)
ContentResultTests.cs (1)
90new MediaTypeHeaderValue("text/foo") { Charset = "us-ascii" },
Microsoft.AspNetCore.Mvc.Core.Test (1)
ContentResultTest.cs (1)
102new MediaTypeHeaderValue("text/foo") { Charset = "us-ascii" },
Microsoft.Net.Http.Headers (2)
MediaTypeHeaderValue.cs (2)
135Charset = null; 139Charset = value.WebName;
Microsoft.Net.Http.Headers.Tests (21)
MediaTypeHeaderValueTest.cs (21)
234mediaType.Charset = "mycharset"; 239mediaType.Charset = null; 242mediaType.Charset = null; // It's OK to set it again to null; no exception. 256mediaType.Charset = "new_charset"; 332mediaType.Charset = "utf-8"; 338mediaType.Charset = null; 347mediaType2.Charset = "utf-8"; 366mediaType2.Charset = "utf-8"; 394CheckValidParse("\r\n text / plain ; charset = utf-8 ", new MediaTypeHeaderValue("text/plain") { Charset = "utf-8" }); 395CheckValidParse(" text/plain;charset=utf-8", new MediaTypeHeaderValue("text/plain") { Charset = "utf-8" }); 397CheckValidParse("text/plain; charset=iso-8859-1", new MediaTypeHeaderValue("text/plain") { Charset = "iso-8859-1" }); 399var expected = new MediaTypeHeaderValue("text/plain") { Charset = "utf-8" }; 407expected = new MediaTypeHeaderValue("text/plain") { Charset = "utf-8" }; 411expected = new MediaTypeHeaderValue("text/plain") { Charset = "utf-8" }; 427expected.Charset = "iso-8859-1"; 432expected.Charset = "utf-8"; 440expected.Charset = "utf-8"; 445expected.Charset = "utf-8"; 480expected.Charset = "utf-8"; 485value1.Charset = "iso-8859-1"; 491value2.Charset = "utf-8";
17 references to Charset
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\JsonRequestHelpers.cs (2)
41charset = mt.Charset; 48charset = mt.Charset;
Microsoft.AspNetCore.HeaderParsing.Tests (2)
ParserTests.cs (2)
178Assert.Equal("UTF-8", result.Charset); 207Assert.Equal("UTF-8", result[0].Charset);
Microsoft.AspNetCore.Http.Extensions (2)
HttpRequestJsonExtensions.cs (2)
288charset = mt.Charset; 295charset = mt.Charset;
Microsoft.AspNetCore.Mvc.Core.Test (1)
Formatters\JsonOutputFormatterTestBase.cs (1)
168httpContext.Request.Headers.AcceptCharset = contentType.Charset.ToString();
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
XmlDataContractSerializerOutputFormatterTest.cs (1)
804request.Headers["Accept-Charset"] = MediaTypeHeaderValue.Parse(contentType).Charset.ToString();
XmlSerializerOutputFormatterTest.cs (1)
586request.Headers["Accept-Charset"] = MediaTypeHeaderValue.Parse(contentType).Charset.ToString();
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (1)
src\Mvc\Mvc.Core\test\Formatters\JsonOutputFormatterTestBase.cs (1)
168httpContext.Request.Headers.AcceptCharset = contentType.Charset.ToString();
Microsoft.Net.Http.Headers (2)
MediaTypeHeaderValue.cs (2)
108/// the <see cref="Charset"/> to <see cref="Encoding.WebName"/>. 114var charset = Charset;
Microsoft.Net.Http.Headers.Tests (5)
MediaTypeHeaderValueTest.cs (5)
107Assert.Null(mediaType.Charset.Value); 235Assert.Equal("mycharset", mediaType.Charset.AsSpan()); 240Assert.Null(mediaType.Charset.Value); 257Assert.Equal("new_charset", mediaType.Charset.AsSpan()); 262Assert.Null(mediaType.Charset.Value);