6 writes to ContentType
Microsoft.AspNetCore.Mvc.Core (1)
ControllerBase.cs (1)
290ContentType = contentType?.ToString()
Microsoft.AspNetCore.Mvc.Core.Test (3)
ContentResultTest.cs (3)
30ContentType = new MediaTypeHeaderValue("text/plain") 125ContentType = contentType?.ToString() 228ContentType = contentType
Microsoft.AspNetCore.Mvc.RazorPages (2)
PageBase.cs (1)
257ContentType = contentType?.ToString()
PageModel.cs (1)
589ContentType = contentType?.ToString()
36 references to ContentType
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\ContentResultExecutor.cs (1)
42result.ContentType,
Microsoft.AspNetCore.Mvc.Core.Test (11)
ControllerBaseTest.cs (11)
2191Assert.Null(actualContentResult.ContentType); 2206Assert.Null(MediaType.GetEncoding(actualContentResult.ContentType)); 2207Assert.Equal("text/plain", actualContentResult.ContentType.ToString()); 2222Assert.Same(Encoding.UTF8, MediaType.GetEncoding(actualContentResult.ContentType)); 2223Assert.Equal("text/plain; charset=utf-8", actualContentResult.ContentType.ToString()); 2237Assert.Null(contentResult.ContentType); 2251Assert.NotNull(contentResult.ContentType); 2252Assert.Equal(contentType, contentResult.ContentType.ToString()); 2254Assert.Null(MediaType.GetEncoding(contentResult.ContentType)); 2268MediaTypeAssert.Equal(contentType, contentResult.ContentType); 2282Assert.Equal(contentType, contentResult.ContentType);
Microsoft.AspNetCore.Mvc.RazorPages.Test (22)
PageModelTest.cs (11)
1576Assert.Null(actualContentResult.ContentType); 1591Assert.Null(MediaType.GetEncoding(actualContentResult.ContentType)); 1592Assert.Equal("text/plain", actualContentResult.ContentType.ToString()); 1607Assert.Same(Encoding.UTF8, MediaType.GetEncoding(actualContentResult.ContentType)); 1608Assert.Equal("text/plain; charset=utf-8", actualContentResult.ContentType.ToString()); 1622Assert.Null(contentResult.ContentType); 1636Assert.NotNull(contentResult.ContentType); 1637Assert.Equal(contentType, contentResult.ContentType.ToString()); 1639Assert.Null(MediaType.GetEncoding(contentResult.ContentType)); 1653MediaTypeAssert.Equal(contentType, contentResult.ContentType); 1667Assert.Equal(contentType, contentResult.ContentType);
PageTest.cs (11)
1566Assert.Null(actualContentResult.ContentType); 1581Assert.Null(MediaType.GetEncoding(actualContentResult.ContentType)); 1582Assert.Equal("text/plain", actualContentResult.ContentType.ToString()); 1597Assert.Same(Encoding.UTF8, MediaType.GetEncoding(actualContentResult.ContentType)); 1598Assert.Equal("text/plain; charset=utf-8", actualContentResult.ContentType.ToString()); 1612Assert.Null(contentResult.ContentType); 1626Assert.NotNull(contentResult.ContentType); 1627Assert.Equal(contentType, contentResult.ContentType.ToString()); 1629Assert.Null(MediaType.GetEncoding(contentResult.ContentType)); 1643MediaTypeAssert.Equal(contentType, contentResult.ContentType); 1657Assert.Equal(contentType, contentResult.ContentType);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
ControllerUnitTestabilityTests.cs (2)
77Assert.Equal("text/asp; charset=us-ascii", contentResult.ContentType.ToString()); 78Assert.Equal(encoding, MediaType.GetEncoding(contentResult.ContentType));