Base:
50 references to ToString
Microsoft.AspNetCore.Http.Results (2)
TypedResults.cs (2)
173return new(content, mediaTypeHeaderValue?.ToString(), statusCode); 183=> new(content, contentType.ToString());
Microsoft.AspNetCore.Http.Results.Tests (8)
ContentResultTests.cs (2)
21}.ToString(); 110var contentResult = new ContentHttpResult(content, contentType?.ToString());
ResultsTests.cs (3)
532Assert.Equal(mediaType.ToString(), result.ContentType); 1655Assert.Equal(expectedMediaType.ToString(), result.ContentType); 1675Assert.Equal(expectedMediaType.ToString(), result.ContentType);
TypedResultsTests.cs (3)
528Assert.Equal(mediaType.ToString(), result.ContentType); 1434Assert.Equal(expectedMediaType.ToString(), result.ContentType); 1454Assert.Equal(expectedMediaType.ToString(), result.ContentType);
Microsoft.AspNetCore.Mvc.Core (10)
ControllerBase.cs (1)
290ContentType = contentType?.ToString()
FileContentResult.cs (1)
39: base(contentType.ToString())
FileStreamResult.cs (1)
39: base(contentType.ToString())
Formatters\FormatterMappings.cs (1)
45_map[format] = contentType.ToString();
Formatters\MediaTypeCollection.cs (3)
22Add(item.ToString()); 39Insert(index, item.ToString()); 53return Remove(item.ToString());
Infrastructure\SystemTextJsonResultExecutor.cs (1)
21}.ToString();
PhysicalFileResult.cs (1)
38: base(contentType.ToString())
VirtualFileResult.cs (1)
39: base(contentType.ToString())
Microsoft.AspNetCore.Mvc.Core.Test (13)
ContentResultTest.cs (2)
33}.ToString() 125ContentType = contentType?.ToString()
Formatters\JsonOutputFormatterTestBase.cs (3)
97ContentType = new StringSegment(mediaType.ToString()), 129ContentType = new StringSegment(mediaType.ToString()), 167httpContext.Request.ContentType = contentType.ToString();
Formatters\ResponseContentTypeHelperTest.cs (1)
109contentType?.ToString(),
Formatters\SystemTextJsonOutputFormatterTest.cs (6)
51ContentType = new StringSegment(mediaType.ToString()), 79ContentType = new StringSegment(mediaType.ToString()), 106ContentType = new StringSegment(mediaType.ToString()), 135ContentType = new StringSegment(mediaType.ToString()), 197ContentType = new StringSegment(mediaType.ToString()), 237ContentType = new StringSegment(mediaType.ToString()),
Infrastructure\JsonResultExecutorTestBase.cs (1)
119}.ToString();
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
NewtonsoftJsonResultExecutor.cs (1)
25}.ToString();
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (7)
NewtonsoftJsonOutputFormatterTest.cs (3)
454ContentType = new StringSegment(mediaType.ToString()), 499ContentType = new StringSegment(mediaType.ToString()), 533ContentType = new StringSegment(mediaType.ToString()),
src\Mvc\Mvc.Core\test\Formatters\JsonOutputFormatterTestBase.cs (3)
97ContentType = new StringSegment(mediaType.ToString()), 129ContentType = new StringSegment(mediaType.ToString()), 167httpContext.Request.ContentType = contentType.ToString();
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (1)
119}.ToString();
Microsoft.AspNetCore.Mvc.RazorPages (2)
PageBase.cs (1)
257ContentType = contentType?.ToString()
PageModel.cs (1)
589ContentType = contentType?.ToString()
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (3)
ViewComponentResultTest.cs (2)
528new MediaTypeHeaderValue("text/foo") { Encoding = Encoding.ASCII }.ToString(), 601ContentType = new MediaTypeHeaderValue("text/html") { Encoding = Encoding.UTF8 }.ToString(),
ViewExecutorTest.cs (1)
151contentType?.ToString(),
Microsoft.Net.Http.Headers.Tests (4)
MediaTypeHeaderValueTest.cs (4)
330Assert.Equal("text/plain", mediaType.ToString()); 333Assert.Equal("text/plain; charset=utf-8", mediaType.ToString()); 336Assert.Equal("text/plain; charset=utf-8; custom=\"custom value\"", mediaType.ToString()); 339Assert.Equal("text/plain; custom=\"custom value\"", mediaType.ToString());