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