Base:
98 references to ToString
dotnet-svcutil-lib (3)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageHelper.cs (2)
133_contentType = mediaValueContentType == null ? string.Empty : mediaValueContentType.ToString(); 341throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ProtocolException(string.Format(SRServiceModel.FramingContentTypeMismatch, _httpRequestMessage.Content.Headers.ContentType.ToString(), _httpRequestMessage.RequestUri)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageContent.cs (1)
113new ProtocolException(string.Format(SRServiceModel.HttpContentTypeFormatException, formatException.Message, Headers.ContentType.ToString()), formatException));
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (22)
HealthCheckEndpointRouteBuilderExtensionsTest.cs (2)
81Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 126Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
HealthCheckMiddlewareSampleTest.cs (4)
31Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 53Assert.Equal("application/json", response.Content.Headers.ContentType.ToString()); 76Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 98Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
HealthCheckMiddlewareTests.cs (16)
122Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 152Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 185Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 218Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 251Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 284Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 329Assert.Equal("application/json", response.Content.Headers.ContentType.ToString()); 505Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 535Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 593Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 658Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 695Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 733Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 771Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 851Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 895Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
Microsoft.AspNetCore.Identity.FunctionalTests (2)
MapIdentityApiTests.cs (2)
1449Assert.Equal("application/problem+json", response.Content.Headers.ContentType?.ToString()); 1459Assert.Equal("application/problem+json", response.Content.Headers.ContentType?.ToString());
Microsoft.AspNetCore.Mvc.FunctionalTests (50)
ContentNegotiationTest.cs (4)
223Assert.Equal(expectedMediaType, contentType.ToString()); 375Assert.Equal("text/plain; charset=utf-8", response.Content.Headers.ContentType.ToString()); 393Assert.Equal("application/json; charset=utf-8", response.Content.Headers.ContentType.ToString()); 535Assert.Equal("application/xml; charset=utf-8", response.Content.Headers.ContentType.ToString());
DoNotRespectBrowserAcceptHeaderTests.cs (4)
53Assert.Equal("application/json; charset=utf-8", response.Content.Headers.ContentType.ToString()); 81Assert.Equal("application/xml; charset=utf-8", response.Content.Headers.ContentType.ToString()); 112Assert.Equal("application/json; charset=utf-8", response.Content.Headers.ContentType.ToString()); 141Assert.Equal("application/xml; charset=utf-8", response.Content.Headers.ContentType.ToString());
FileResultTests.cs (39)
45Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 68Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 90Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 110Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 132Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 154Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 174Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 192Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 218Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 237Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 257Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 290Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 315Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 332Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 354Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 377Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 398Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 413Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 439Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 458Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 509Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 533Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 556Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 578Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 598Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 602Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 617Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 643Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 662Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 682Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 715Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 742Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 769Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 793Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 812Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 835Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 859Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 882Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 919Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
RespectBrowserAcceptHeaderTests.cs (2)
53Assert.Equal("application/json; charset=utf-8", response.Content.Headers.ContentType.ToString()); 72Assert.Equal("text/plain; charset=utf-8", response.Content.Headers.ContentType.ToString());
StreamOutputFormatterTest.cs (1)
42Assert.Equal(contentType, response.Content.Headers.ContentType?.ToString());
Microsoft.AspNetCore.StaticAssets.Tests (6)
StaticAssetsIntegrationTests.cs (6)
66Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 116Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 168Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 337Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 390Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 446Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
Microsoft.AspNetCore.StaticFiles.FunctionalTests (2)
StaticFileMiddlewareTests.cs (2)
163Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 205Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
Microsoft.AspNetCore.StaticFiles.Tests (12)
DirectoryBrowserMiddlewareTests.cs (3)
171Assert.Equal("text/html; charset=utf-8", response.Content.Headers.ContentType.ToString()); 228Assert.Equal("text/html; charset=utf-8", response.Content.Headers.ContentType.ToString()); 371Assert.Equal("text/html; charset=utf-8", response.Content.Headers.ContentType.ToString());
RangeHeaderTests.cs (2)
426Assert.Equal("text/plain", resp.Content.Headers.ContentType.ToString()); 446Assert.Equal("text/plain", resp.Content.Headers.ContentType.ToString());
StaticFileMiddlewareTests.cs (7)
190Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 229Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 271Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 321Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 364Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 412Assert.Equal("text/customfortest+plain", response.Content.Headers.ContentType.ToString()); 482Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
Microsoft.AspNetCore.TestHost.Tests (1)
RequestBuilderTests.cs (1)
33Assert.Equal("Test/Value", request.Content.Headers.ContentType.ToString());