1363 references to Contains
Aspire.Cli.Tests (1)
Commands\ExecCommandTests.cs (1)
136Assert.DoesNotContain(testOutputWriter.Logs, x => x.Contains(InteractionServiceStrings.FindingAppHosts));
Aspire.Components.Common.TestUtilities (2)
ConformanceTests.cs (2)
144Assert.All(registeredNames, name => Assert.True(name.Contains(key1) || name.Contains(key2), $"{name} did not contain the key."));
Aspire.Dashboard.Components.Tests (1)
Pages\TraceDetailsTests.cs (1)
320return testSink.Writes.Any(w => w.Message?.Contains($"Trace '{traceId}' is unchanged.") ?? false);
Aspire.Dashboard.Tests (3)
Integration\StartupTests.cs (1)
389if (!w.Message?.Contains("The dashboard is configured with a shared endpoint for browser access and the OTLP service. The endpoint doesn't use TLS so browser access is only possible via a TLS terminating proxy.") ?? false)
tests\Shared\Playwright\WrapperForIPage.cs (2)
22HasErrors = e.Text.Contains("Error: WebSocket closed with status code") || e.Text.Contains("net::ERR_NETWORK_CHANGED");
Aspire.EndToEnd.Tests (4)
tests\Shared\Playwright\WrapperForIPage.cs (2)
22HasErrors = e.Text.Contains("Error: WebSocket closed with status code") || e.Text.Contains("net::ERR_NETWORK_CHANGED");
tests\Shared\TemplatesTesting\AspireProject.cs (1)
226if (line?.Contains("Distributed application started") == true)
tests\Shared\TemplatesTesting\TestExtensions.cs (1)
26catch (InvalidOperationException ie) when (ie.Message.Contains("No process is associated with this object"))
Aspire.Hosting.Azure (1)
Provisioning\Internal\BaseProvisioningContextProvider.cs (1)
72return !name.Contains("..");
Aspire.Hosting.Azure.Tests (13)
AzureAppServiceTests.cs (2)
358verifySettings.ScrubLines(line => line.Contains("\"path\"") && line.Contains(".csproj"));
AzureDeployerTests.cs (7)
146cmd => cmd.ExecutablePath.Contains("az") && 185cmd => cmd.ExecutablePath.Contains("az") && 235cmd => cmd.ExecutablePath.Contains("az") && 285cmd => cmd.ExecutablePath.Contains("az") && 365cmd => cmd.ExecutablePath.Contains("az") && 368cmd => cmd.ExecutablePath.Contains("az") && 476cmd => cmd.ExecutablePath.Contains("az") &&
AzureEventHubsExtensionsTests.cs (4)
166var volumeAnnotation = eventHubs.Resource.Annotations.OfType<ContainerMountAnnotation>().Single(a => !a.Target.Contains("Config.json")); 185var volumeAnnotation = eventHubs.Resource.Annotations.OfType<ContainerMountAnnotation>().Single(a => !a.Target.Contains("Config.json")); 204var volumeAnnotation = eventHubs.Resource.Annotations.OfType<ContainerMountAnnotation>().Single(a => !a.Target.Contains("Config.json")); 223var volumeAnnotation = eventHubs.Resource.Annotations.OfType<ContainerMountAnnotation>().Single(a => !a.Target.Contains("Config.json"));
Aspire.Hosting.Containers.Tests (1)
WithDockerfileTests.cs (1)
80Assert.Contains(logs, log => log.Message.Contains("load build definition from Dockerfile"));
Aspire.Hosting.MySql.Tests (2)
MySqlFunctionalTests.cs (2)
24private static readonly Predicate<string> s_mySqlReadyText = log => log.Contains("ready for connections") && log.Contains("port: 3306");
Aspire.Hosting.Testing.Tests (3)
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (3)
28return WaitForTextAsync(app, (log) => log.Contains(logText), resourceName, cancellationToken); 52return app.WaitForTextAsync((log) => logTexts.Any(x => log.Contains(x)), resourceName, cancellationToken); 106if (log.Contains(text))
Aspire.Hosting.Tests (62)
AppHostSmokeTests.cs (1)
73var errorLog = testSink.Writes.SingleOrDefault(w => w.Message?.Contains(expectedLocaleError) ?? false);
Backchannel\Exec\ExecTestsBase.cs (1)
56var logFound = logs.Any(x => x.Text.Contains(expectedMessage));
Codespaces\CodespacesUrlRewriterTests.cs (2)
41urlRewriterStopped = logs.Any(l => l.Message.Contains("Not running in Codespaces, skipping URL rewriting.")); 82var match = re.Snapshot.Urls.Length > 0 && re.Snapshot.Urls[0].Url.Contains("app.github.dev");
Dcp\DcpExecutorTests.cs (14)
706Assert.Contains(watchLogsResults1, l => l.Content.Contains("First")); 707Assert.Contains(watchLogsResults1, l => l.Content.Contains("Second")); 708Assert.Contains(watchLogsResults1, l => l.Content.Contains("Third")); 709Assert.Contains(watchLogsResults1, l => l.Content.Contains("Forth")); 710Assert.Contains(watchLogsResults1, l => l.Content.Contains("Fifth")); 711Assert.Contains(watchLogsResults1, l => l.Content.Contains("Sixth")); 712Assert.Contains(watchLogsResults1, l => l.Content.Contains("Seventh")); 718Assert.Contains(watchLogsResults2, l => l.Content.Contains("First")); 719Assert.Contains(watchLogsResults2, l => l.Content.Contains("Second")); 720Assert.Contains(watchLogsResults2, l => l.Content.Contains("Third")); 721Assert.Contains(watchLogsResults2, l => l.Content.Contains("Forth")); 722Assert.Contains(watchLogsResults2, l => l.Content.Contains("Fifth")); 723Assert.Contains(watchLogsResults2, l => l.Content.Contains("Sixth")); 724Assert.Contains(watchLogsResults2, l => l.Content.Contains("Seventh"));
DistributedApplicationTests.cs (2)
845r => r.Status?.State == ContainerState.FailedToStart && (r.Status?.Message.Contains("bob") ?? false)).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1233Assert.All(serviceList.Where(s => s.Metadata.Name.Contains("redis")), s => Assert.Equal(AddressAllocationModes.Proxyless, s.Spec.AddressAllocationMode));
Health\ResourceHealthCheckServiceTests.cs (2)
237return testSink.Writes.Any(w => w.Message?.Contains($"Resource 'resource' health check monitoring loop starting delay of {rhcs.HealthyHealthCheckInterval}.") ?? false); 279return testSink.Writes.Any(w => w.Message?.Contains($"Resource 'resource' health check monitoring loop starting delay of {(rhcs.NonHealthyHealthCheckStepInterval * i)}.") ?? false);
Publishing\ResourceContainerImageBuilderTests.cs (22)
43Assert.Contains(logs, log => log.Message.Contains("Building container image for resource servicea")); 44Assert.Contains(logs, log => log.Message.Contains(".NET CLI completed with exit code: 0")); 73Assert.Contains(logs, log => log.Message.Contains("Building container image for resource container")); 76log.Message.Contains("Failed to build container image")); 111Assert.Contains(logs, log => log.Message.Contains("Building container image for resource servicea")); 112Assert.Contains(logs, log => log.Message.Contains(".NET CLI completed with exit code: 0")); 116log.Message.Contains("Failed to build container image")); 149Assert.Contains(logs, log => log.Message.Contains("Building container image for resource servicea")); 150Assert.Contains(logs, log => log.Message.Contains(".NET CLI completed with exit code: 0")); 183Assert.Contains(logs, log => log.Message.Contains("Building container image for resource servicea")); 184Assert.Contains(logs, log => log.Message.Contains(".NET CLI completed with exit code: 0")); 220Assert.Contains(logs, log => log.Message.Contains("Building container image for resource container")); 223log.Message.Contains("Failed to build container image")); 260Assert.Contains(logs, log => log.Message.Contains("Building container image for resource container")); 264log.Message.Contains("Failed to build container image")); 299Assert.Contains(logs, log => log.Message.Contains("Building container image for resource servicea")); 300Assert.Contains(logs, log => log.Message.Contains(".NET CLI completed with exit code: 0")); 335Assert.Contains(logs, log => log.Message.Contains("Building container image for resource servicea")); 336Assert.Contains(logs, log => log.Message.Contains(".NET CLI completed with exit code: 0")); 366Assert.Contains(logs, log => log.Message.Contains("Building container image for resource servicea")); 367Assert.Contains(logs, log => log.Message.Contains(".NET CLI completed with exit code: 0")); 474Assert.Contains(logs, log => log.Message.Contains("Container runtime is not running or is unhealthy. Cannot build container images."));
ResourceNotificationTests.cs (12)
325Assert.Contains(logs, l => l.Level == LogLevel.Debug && l.Message.Contains("Resource resource1/resource1 changed state: SomeState")); 335Assert.DoesNotContain(logs, l => l.Level == LogLevel.Debug && l.Message.Contains("Resource resource1/resource1 changed state: SomeState")); 345Assert.Contains(logs, l => l.Level == LogLevel.Debug && l.Message.Contains("Resource resource1/resource1 changed state: SomeState -> NewState")); 355Assert.DoesNotContain(logs, l => l.Level == LogLevel.Debug && l.Message.Contains("Resource resource1/resource1 changed state:")); 365Assert.DoesNotContain(logs, l => l.Level == LogLevel.Debug && l.Message.Contains("Resource resource1/resource1 changed state:")); 375Assert.DoesNotContain(logs, l => l.Level == LogLevel.Debug && l.Message.Contains("Resource resource1/resource1 changed state:")); 396Assert.Contains(logs, l => l.Level == LogLevel.Trace && l.Message.Contains("Resource resource1/resource1 update published:") && l.Message.Contains($"CreationTimeStamp = {createdDate:s}")); 397Assert.Contains(logs, l => l.Level == LogLevel.Trace && l.Message.Contains("Resource resource1/resource1 update published:") && l.Message.Contains("State = { Text = SomeState")); 398Assert.Contains(logs, l => l.Level == LogLevel.Trace && l.Message.Contains("Resource resource1/resource1 update published:") && l.Message.Contains("ExitCode = 0"));
Utils\LoggerNotificationExtensions.cs (3)
28return WaitForTextAsync(app, (log) => log.Contains(logText), resourceName, cancellationToken); 52return app.WaitForTextAsync((log) => logTexts.Any(x => log.Contains(x)), resourceName, cancellationToken); 106if (log.Contains(text))
WaitForTests.cs (1)
579Assert.Contains(logs, log => log.Message.Contains("The resource ready event failed!"));
WithHttpCommandTests.cs (2)
153var command2 = commands.FirstOrDefault(c => c.DisplayName == "Do The Thing" && c.Name.Contains("custom-endpoint")); 155var command4 = commands.FirstOrDefault(c => c.DisplayName == "Do The Get Thing" && c.Name.Contains("custom-endpoint"));
Aspire.Playground.Tests (4)
Infrastructure\DistributedApplicationTestFactory.cs (1)
62if (registry is null || registry.Contains("docker.io"))
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (3)
28return WaitForTextAsync(app, (log) => log.Contains(logText), resourceName, cancellationToken); 52return app.WaitForTextAsync((log) => logTexts.Any(x => log.Contains(x)), resourceName, cancellationToken); 106if (log.Contains(text))
Aspire.Templates.Tests (5)
TemplateTestsBase.cs (1)
126if (!inTest && line.Contains(marker))
tests\Shared\Playwright\WrapperForIPage.cs (2)
22HasErrors = e.Text.Contains("Error: WebSocket closed with status code") || e.Text.Contains("net::ERR_NETWORK_CHANGED");
tests\Shared\TemplatesTesting\AspireProject.cs (1)
226if (line?.Contains("Distributed application started") == true)
tests\Shared\TemplatesTesting\TestExtensions.cs (1)
26catch (InvalidOperationException ie) when (ie.Message.Contains("No process is associated with this object"))
AutobahnTestApp (1)
Program.cs (1)
49if (urls.Contains(";"))
BasicTestApp (2)
Program.cs (2)
99if (currentUrl.Contains("error=sync")) 106if (currentUrl.Contains("error=async"))
BoundTreeGenerator (2)
BoundNodeClassWriter.cs (2)
1738if (!typeName.Contains("<")) 1765if (!typeName.Contains("<"))
Client.ExpectedExceptions.IntegrationTests (5)
ExpectedExceptionTests.4.1.0.cs (5)
51Assert.True(exception.Message.Contains(nonExistentHost), string.Format("Expected exception message to contain: '{0}'\nThe exception message was: {1}", nonExistentHost, exception.Message)); 184Assert.True(exception.Message.Contains(notFoundUrl), string.Format("Expected exception message to contain: '{0}'\nThe exception message was:{1}", notFoundUrl, exception.Message)); 222Assert.True(exception.Message.Contains(protocolExceptionUri), string.Format("Expected exception message to contain: '{0}'\nThe exception was: '{1}'", protocolExceptionUri, exception.Message)); 408Assert.True(exception.Message.Contains(Endpoints.Tcp_RevokedServerCertResource_HostName), 455Assert.True(exception.Message.Contains(Endpoints.Tcp_RevokedServerCertResource_HostName),
CodeGenerator (7)
src\Servers\Kestrel\shared\KnownHeaders.cs (7)
1400{(loop.ClassName.Contains("Request") ? "" : @$"_currentKnownType = KnownHeaderType.{header.Identifier}; 1403{(!loop.ClassName.Contains("Trailers") ? $@"case {loop.Headers.Length - 1}: // Header: ""Content-Length"" 1406{(loop.ClassName.Contains("Request") ? "" : @"_currentKnownType = KnownHeaderType.ContentLength; 1413{(loop.ClassName.Contains("Request") ? "" : @"_currentKnownType = default; 1417{(loop.ClassName.Contains("Request") ? "" : @"_currentKnownType = KnownHeaderType.Unknown; 1428{(!loop.ClassName.Contains("Trailers") ? $@"_next = _collection._contentLength.HasValue ? {loop.Headers.Length - 1} : -1;" : "_next = -1;")} 1431}}{(loop.ClassName.Contains("Trailers") ? "" : $@"
CSharpSyntaxGenerator (1)
AbstractFileWriter.cs (1)
204if (!typeName.Contains("<"))
dotnet-openapi (1)
Commands\BaseCommand.cs (1)
244if (!csprojContent.Contains($"<PackageReference Include=\"{packageId}\" Version=\"{packageVersion}\""))
dotnet-svcutil-lib (28)
Bootstrapper\SvcutilBootstrapper.cs (1)
130if(targetFramework.ToLowerInvariant().Contains("net7.0-windows10"))
CodeDomFixup\CodeDomVisitors\NamespaceFixer.cs (8)
27if (type.FullName.Contains(s_microsoftXml)) 38if (type.FullName.Contains(s_microsoftCodeDom)) 48if (attr.Name.Contains(s_microsoftXml) && _xmlTypes.ContainsKey(attr.Name)) 52if (attr.Name.Contains(s_microsoftCodeDom) && _codeDomTypes.ContainsKey(attr.Name)) 61if (comment.Text.Contains(s_microsoftXml) && _xmlTypes.ContainsKey(comment.Text)) 65if (comment.Text.Contains(s_microsoftCodeDom) && _codeDomTypes.ContainsKey(comment.Text)) 74if (typeref.BaseType.Contains(s_microsoftXml) && _xmlTypes.ContainsKey(typeref.BaseType)) 78if (typeref.BaseType.Contains(s_microsoftCodeDom) && _codeDomTypes.ContainsKey(typeref.BaseType))
CodeDomFixup\CodeDomVisitors\SpecialIXmlSerializableRemapper.cs (1)
28if (typeref.BaseType.Contains("."))
CodeSerializer.cs (1)
90filePath = _outputFilePath.Contains(" ") ? string.Format(CultureInfo.InvariantCulture, "\"{0}\"", _outputFilePath) : _outputFilePath;
CommandLineParser.cs (1)
127cmd = cmd.Where(c => !c.ToLowerInvariant().Contains("additionalprobingpath")).ToArray();
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (1)
809if (typeName.Contains(argument))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (1)
977if (typeName.Contains(argument))
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BinaryMessageEncoder.cs (2)
870!acceptEncoding.Contains(MessageEncoderCompressionHandler.GZipContentEncoding)) || 872!acceptEncoding.Contains(MessageEncoderCompressionHandler.DeflateContentEncoding)))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceMetadataExtension.cs (1)
234text.Contains(ServiceMetadataExtension.BaseAddressPattern))
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityUtils.cs (2)
510if (principalName.Contains("@") || principalName.Contains(@"\"))
Shared\FrameworkInfo.cs (5)
57if(!versionString.Contains(".")) 67if (versionString.Contains("-")) 78if (name.ToLower().Contains(Netversion)) 81if (name.ToLower().Contains(Netstandard)) 87else if (name.ToLower().Contains(Netframework) || version.Major >= 5)
Shared\MSBuildProj.cs (2)
798if (File.Exists(assetsFile) && !(this.TargetFramework.Contains("-") && !this.TargetFramework.ToLower().Contains("windows")))
Shared\Utilities\PathHelper.cs (1)
113var childDirectory = childFileName.Contains("*") ? Path.GetDirectoryName(childPath) : childPath;
Shared\Utilities\Utilities.cs (1)
41if (!(e is AggregateException) && !string.IsNullOrWhiteSpace(exMsg) && !message.ToString().Contains(exMsg))
dotnet-svcutil-lib.Tests (6)
ProjectUtils.cs (3)
108if (csStr.Contains("optstring")) 124if (csStr.Contains("using")) 147if (csprojStr.Contains("System.ServiceModel"))
TestInit.cs (3)
475fileLines1.RemoveAll(l => exceptLines.Any(ex => l.Contains(ex))); 476fileLines2.RemoveAll(l => exceptLines.Any(ex => l.Contains(ex))); 563FileInfo nugetFile = binDirectory.GetFiles("dotnet-svcutil-lib.*.nupkg", SearchOption.AllDirectories).Where(f => !f.Name.Contains("symbols")).OrderByDescending(f => f.LastWriteTime).FirstOrDefault();
Extensibility.WebSockets.IntegrationTests (5)
WebSocketTests.4.1.0.cs (5)
478Assert.True(!ScenarioTestHelpers.IsLocalHost() || !serverLogItem.Contains(ScenarioTestHelpers.RemoteEndpointMessagePropertyFailure), serverLogItem); 536Assert.True(!ScenarioTestHelpers.IsLocalHost() || !serverLogItem.Contains(ScenarioTestHelpers.RemoteEndpointMessagePropertyFailure), serverLogItem); 594Assert.True(!ScenarioTestHelpers.IsLocalHost() || !serverLogItem.Contains(ScenarioTestHelpers.RemoteEndpointMessagePropertyFailure), serverLogItem); 653Assert.True(!ScenarioTestHelpers.IsLocalHost() || !serverLogItem.Contains(ScenarioTestHelpers.RemoteEndpointMessagePropertyFailure), serverLogItem); 714Assert.True(!ScenarioTestHelpers.IsLocalHost() || !serverLogItem.Contains(ScenarioTestHelpers.RemoteEndpointMessagePropertyFailure), serverLogItem);
GenerateDocumentationAndConfigFiles (8)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (4)
290!pattern.Contains(DefaultCSharpExtensionWithoutDot); 294!pattern.Contains(DefaultVisualBasicExtensionWithoutDot); 298!(pattern.Contains(DefaultCSharpExtensionWithoutDot) && pattern.Contains(DefaultVisualBasicExtensionWithoutDot));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
45if (!headerText.Contains("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
168if (str.Contains(","))
GetDocument.Insider (1)
Commands\GetDocumentCommandWorker.cs (1)
413while (sanitizedDocumentName.Contains(InvalidFilenameString))
HelixTestRunner (1)
TestRunner.cs (1)
208if (discoveryResult.StandardOutput.Contains("Exception thrown"))
Http3SampleApp (2)
src\Shared\HttpClient\HttpEventSourceListener.cs (2)
41return eventSource.Name.Contains("System.Net.Quic") || eventSource.Name.Contains("System.Net.Http");
HttpStress (2)
Program.cs (2)
149if (e.InnerException.Message.Contains("INTERNAL_ERROR") || e.InnerException.Message.Contains("CANCEL"))
IdeCoreBenchmarks (1)
IncrementalSourceGeneratorBenchmarks.cs (1)
152var syntaxTree = compilation.SyntaxTrees.Single(t => t.FilePath.Contains("AbstractCaseCorrectionService"));
IIS.FunctionalTests (13)
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (1)
229Assert.Contains(TestSink.Writes, context => context.Message.Contains(version + @"\aspnetcorev2_outofprocess.dll"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
54if (!HelixHelper.GetTargetHelixQueue().ToLowerInvariant().Contains("windows.amd64.server2022"))
src\Servers\IIS\IIS\test\Common.FunctionalTests\Inprocess\MaxRequestBodySizeTests.cs (3)
129Assert.True(requestLine.Contains("404") || requestLine.Contains("413")); 161Assert.Single(TestSink.Writes, w => w.Message.Contains("Increasing the MaxRequestBodySize conflicts with the max value for IIS limit maxAllowedContentLength." +
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (5)
301Assert.Contains(TestSink.Writes, context => context.Message.Contains(firstWriteString)); 316var aspnetcorev2Log = TestSink.Writes.First(w => w.Message.Contains("Description: IIS ASP.NET Core Module V2. Commit:")); 317var aspnetcoreHandlerLog = TestSink.Writes.First(w => w.Message.Contains("Description: IIS ASP.NET Core Module V2 Request Handler. Commit:")); 347Assert.True(logContents.Contains("[aspnetcorev2_inprocess.dll]") || logContents.Contains("[aspnetcorev2_outofprocess.dll]"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\MaxRequestBodySizeTests.cs (3)
129Assert.True(requestLine.Contains("404") || requestLine.Contains("413")); 161Assert.Single(TestSink.Writes, w => w.Message.Contains("Increasing the MaxRequestBodySize conflicts with the max value for IIS limit maxAllowedContentLength." +
IIS.LongTests (6)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
54if (!HelixHelper.GetTargetHelixQueue().ToLowerInvariant().Contains("windows.amd64.server2022"))
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (5)
122Assert.Equal(1, TestSink.Writes.Count(w => w.Message.Contains("Invoking where.exe to find dotnet.exe"))); 154Assert.Equal(1, TestSink.Writes.Count(w => w.Message.Contains($"Found dotnet.exe in InstallLocation at '{installDir}\\dotnet.exe'"))); 982Assert.Contains(TestSink.Writes, context => context.Message.Contains("An unhandled exception was thrown by the application.")); 1006Assert.Contains(TestSink.Writes, context => context.Message.Contains(expectedLogString)); 1049Assert.Contains(TestSink.Writes, context => context.Message.Contains("Is Console redirection: True"));
IIS.NewHandler.FunctionalTests (6)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
54if (!HelixHelper.GetTargetHelixQueue().ToLowerInvariant().Contains("windows.amd64.server2022"))
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (5)
122Assert.Equal(1, TestSink.Writes.Count(w => w.Message.Contains("Invoking where.exe to find dotnet.exe"))); 154Assert.Equal(1, TestSink.Writes.Count(w => w.Message.Contains($"Found dotnet.exe in InstallLocation at '{installDir}\\dotnet.exe'"))); 982Assert.Contains(TestSink.Writes, context => context.Message.Contains("An unhandled exception was thrown by the application.")); 1006Assert.Contains(TestSink.Writes, context => context.Message.Contains(expectedLogString)); 1049Assert.Contains(TestSink.Writes, context => context.Message.Contains("Is Console redirection: True"));
IIS.NewShim.FunctionalTests (6)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
54if (!HelixHelper.GetTargetHelixQueue().ToLowerInvariant().Contains("windows.amd64.server2022"))
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (5)
122Assert.Equal(1, TestSink.Writes.Count(w => w.Message.Contains("Invoking where.exe to find dotnet.exe"))); 154Assert.Equal(1, TestSink.Writes.Count(w => w.Message.Contains($"Found dotnet.exe in InstallLocation at '{installDir}\\dotnet.exe'"))); 982Assert.Contains(TestSink.Writes, context => context.Message.Contains("An unhandled exception was thrown by the application.")); 1006Assert.Contains(TestSink.Writes, context => context.Message.Contains(expectedLogString)); 1049Assert.Contains(TestSink.Writes, context => context.Message.Contains("Is Console redirection: True"));
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
54if (!HelixHelper.GetTargetHelixQueue().ToLowerInvariant().Contains("windows.amd64.server2022"))
IISExpress.FunctionalTests (19)
InProcess\AppOfflineIISExpressTests.cs (1)
59Assert.Contains(TestSink.Writes, context => context.Message.Contains("Drained all requests, notifying managed."));
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (1)
229Assert.Contains(TestSink.Writes, context => context.Message.Contains(version + @"\aspnetcorev2_outofprocess.dll"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
54if (!HelixHelper.GetTargetHelixQueue().ToLowerInvariant().Contains("windows.amd64.server2022"))
src\Servers\IIS\IIS\test\Common.FunctionalTests\Inprocess\MaxRequestBodySizeTests.cs (3)
129Assert.True(requestLine.Contains("404") || requestLine.Contains("413")); 161Assert.Single(TestSink.Writes, w => w.Message.Contains("Increasing the MaxRequestBodySize conflicts with the max value for IIS limit maxAllowedContentLength." +
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (5)
301Assert.Contains(TestSink.Writes, context => context.Message.Contains(firstWriteString)); 316var aspnetcorev2Log = TestSink.Writes.First(w => w.Message.Contains("Description: IIS ASP.NET Core Module V2. Commit:")); 317var aspnetcoreHandlerLog = TestSink.Writes.First(w => w.Message.Contains("Description: IIS ASP.NET Core Module V2 Request Handler. Commit:")); 347Assert.True(logContents.Contains("[aspnetcorev2_inprocess.dll]") || logContents.Contains("[aspnetcorev2_outofprocess.dll]"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\MaxRequestBodySizeTests.cs (3)
129Assert.True(requestLine.Contains("404") || requestLine.Contains("413")); 161Assert.Single(TestSink.Writes, w => w.Message.Contains("Increasing the MaxRequestBodySize conflicts with the max value for IIS limit maxAllowedContentLength." +
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (5)
122Assert.Equal(1, TestSink.Writes.Count(w => w.Message.Contains("Invoking where.exe to find dotnet.exe"))); 154Assert.Equal(1, TestSink.Writes.Count(w => w.Message.Contains($"Found dotnet.exe in InstallLocation at '{installDir}\\dotnet.exe'"))); 982Assert.Contains(TestSink.Writes, context => context.Message.Contains("An unhandled exception was thrown by the application.")); 1006Assert.Contains(TestSink.Writes, context => context.Message.Contains(expectedLogString)); 1049Assert.Contains(TestSink.Writes, context => context.Message.Contains("Is Console redirection: True"));
ILLink.CodeFixProvider (1)
DynamicallyAccessedMembersCodeFixProvider.cs (1)
105if (diagnostic.Properties["attributeArgument"] is not string stringArgs || stringArgs.Contains(","))
Infrastructure.Common (2)
ServiceUtilHelper.cs (1)
472if (TestProperties.GetProperty(TestProperties.ServiceUri_PropertyName).Contains("/"))
xunit\ConditionAttribute.cs (1)
63ITypeInfo type = testMethod.TestClass.Class.Assembly.GetTypes(false).Where(t => t.Name.Contains(symbols[0])).SingleOrDefault();
Infrastructure.IntegrationTests (4)
OSAndFrameworkTests.4.1.1.cs (4)
40Assert.True(formatted.Contains("NetCore") && formatted.Contains("NetNative"), 51Assert.True(formatted.Contains("Windows_7") && formatted.Contains("Ubuntu"),
InMemory.FunctionalTests (21)
ConnectionMiddlewareTests.cs (1)
265Assert.Contains(LogMessages, m => m.Message.Contains("Unhandled exception while processing " + connectionId + "."));
Http2\Http2ConnectionTests.cs (2)
1367Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body.")); 5378Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body."));
Http2\Http2StreamTests.cs (6)
1350Assert.Contains(LogMessages, m => m.Exception?.Message.Contains("Response Content-Length mismatch: too many bytes written (12 of 11).") ?? false); 1423Assert.Contains(LogMessages, m => m.Exception?.Message.Contains(CoreStrings.FormatTooFewBytesWritten(0, 11)) ?? false); 1926Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body.")); 2013Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body.")); 2076Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body.")); 3111Assert.Contains(LogMessages, m => (m.Exception?.Message.Contains("App Faulted") ?? false) && m.LogLevel == LogLevel.Error);
Http2\Http2TestBase.cs (2)
1326Assert.Contains(expectedErrorMessage, expected => message.Exception.Message.Contains(expected)); 1346Assert.Contains(LogMessages, m => m.Exception?.Message.Contains(expectedErrorMessage) ?? false);
Http3\Http3StreamTests.cs (4)
2574Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body.")); 2647Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body.")); 2702Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body.")); 2891Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body."));
Http3\Http3TestBase.cs (2)
133Assert.Contains(LogMessages, m => m.Exception?.Message.Contains(expectedErrorMessage) ?? false); 143Assert.Contains(expectedErrorMessage, expected => message.Exception.Message.Contains(expected));
ResponseTests.cs (2)
3027Assert.Single(LogMessages.Where(m => m.Message.Contains(CoreStrings.ConnectionAbortedByApplication))); 3062Assert.Single(LogMessages.Where(m => m.Message.Contains("The connection was aborted by the application via IConnectionLifetimeFeature.Abort().")));
src\Servers\Kestrel\shared\test\CertHelper.cs (2)
74if (cert.Subject.Contains(caName)) 91if (cert.Subject.Contains(caName))
installer.tasks (1)
RegenerateDownloadTable.cs (1)
66.Where(line => line.StartsWith("[") && line.Contains("]:"))
InteractiveHost.UnitTests (4)
InteractiveHostDesktopTests.cs (4)
208Assert.True(errorOut.Contains("CS1002"), "Error output should include error CS1002"); 264Assert.True(errorOut.Contains("CS1056"), "Error output should include error CS1056"); 265Assert.True(errorOut.Contains("CS1002"), "Error output should include error CS1002"); 277Assert.True(errorOut.Contains("CS7010"), "Error output should include error CS7010");
Interop.FunctionalTests (13)
Http3\Http3RequestTests.cs (5)
1951w.Message.Contains("GOAWAY stream ID 4611686018427387903.")); 2220w.Message.Contains("GOAWAY stream ID 4611686018427387903.")); 2250w.Message.Contains("GOAWAY stream ID 4.")); 2254Assert.Contains(TestSink.Writes, m => m.Message.Contains("Some connections failed to close gracefully during server shutdown.")); 2326Assert.DoesNotContain(TestSink.Writes, m => m.Message.Contains("Some connections failed to close gracefully during server shutdown."));
HttpClientHttp2InteropTests.cs (6)
1068Assert.Single(TestSink.Writes.Where(context => context.Message.Contains("received HEADERS frame for stream ID 1 with length 16384 and flags END_STREAM"))); 1069Assert.Single(TestSink.Writes.Where(context => context.Message.Contains("received CONTINUATION frame for stream ID 1 with length 4390 and flags END_HEADERS"))); 1116Assert.Single(TestSink.Writes.Where(context => context.Message.Contains("sending HEADERS frame for stream ID 1 with length 15610 and flags END_STREAM"))); 1117Assert.Equal(2, TestSink.Writes.Where(context => context.Message.Contains("sending CONTINUATION frame for stream ID 1 with length 15585 and flags NONE")).Count()); 1118Assert.Single(TestSink.Writes.Where(context => context.Message.Contains("sending CONTINUATION frame for stream ID 1 with length 14546 and flags END_HEADERS"))); 1178=> context.Message.Contains("received HEADERS frame for stream ID 1 with length 14540 and flags END_STREAM, END_HEADERS")));
src\Shared\HttpClient\HttpEventSourceListener.cs (2)
41return eventSource.Name.Contains("System.Net.Quic") || eventSource.Name.Contains("System.Net.Http");
InteropClient (4)
InteropClient.cs (2)
421Assert.IsTrue(oauthScope.Contains(response.OauthScope)); 461Assert.IsTrue(oauthScope.Contains(response.OauthScope));
src\Shared\HttpClient\HttpEventSourceListener.cs (2)
41return eventSource.Name.Contains("System.Net.Quic") || eventSource.Name.Contains("System.Net.Http");
InteropTests (4)
Helpers\ClientProcess.cs (1)
61if (data.Contains("Application started."))
Helpers\WebsiteProcess.cs (1)
77if (data.Contains("Application started. Press Ctrl+C to shut down."))
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
IOperationGenerator (1)
IOperationClassWriter.Verifier.cs (1)
56if (IsImmutableArray(prop.Type, out _) && prop.Type.Contains("?"))
Metrics (8)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (4)
290!pattern.Contains(DefaultCSharpExtensionWithoutDot); 294!pattern.Contains(DefaultVisualBasicExtensionWithoutDot); 298!(pattern.Contains(DefaultCSharpExtensionWithoutDot) && pattern.Contains(DefaultVisualBasicExtensionWithoutDot));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
45if (!headerText.Contains("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
168if (str.Contains(","))
Metrics.Legacy (8)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (4)
290!pattern.Contains(DefaultCSharpExtensionWithoutDot); 294!pattern.Contains(DefaultVisualBasicExtensionWithoutDot); 298!(pattern.Contains(DefaultCSharpExtensionWithoutDot) && pattern.Contains(DefaultVisualBasicExtensionWithoutDot));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
45if (!headerText.Contains("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
168if (str.Contains(","))
Microsoft.Analyzers.Local (1)
ApiLifecycle\ModelLoader.cs (1)
68if (!assembly.Name.Contains(assemblyName))
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (1)
183if (!tree.Diagnostics.Any(d => ex.Message.Contains(d.Message)))
Microsoft.AspNetCore.App.CodeFixes (1)
Dependencies\ExtensionMethodsCompletionProvider.cs (1)
116(!isIdentifierToken || pair.Key.ExtensionMethod.Contains(token.ValueText));
Microsoft.AspNetCore.App.UnitTests (1)
SharedFxTests.cs (1)
144if (_expectedRid.StartsWith("win", StringComparison.Ordinal) && !_expectedRid.Contains("arm"))
Microsoft.AspNetCore.Authentication.Test (4)
OpenIdConnect\TestTransaction.cs (1)
27var authCookie = SetCookie.SingleOrDefault(c => c.Contains(".AspNetCore.Cookies="));
Transaction.cs (1)
25var authCookie = SetCookie.SingleOrDefault(c => c.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme + "="));
WsFederation\TestSecurityTokenValidator.cs (1)
22if (!string.IsNullOrEmpty(securityToken) && securityToken.Contains("ThisIsAValidToken"))
WsFederation\TestTokenHandler.cs (1)
18if (!string.IsNullOrEmpty(token) && token.Contains("ThisIsAValidToken"))
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
Verifiers\DiagnosticVerifier.cs (2)
194Assert.True(actualSpan.Path == expected.Path || (actualSpan.Path != null && actualSpan.Path.Contains("Test0.") && expected.Path.Contains("Test.")),
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
Verifiers\DiagnosticVerifier.cs (2)
194Assert.True(actualSpan.Path == expected.Path || (actualSpan.Path != null && actualSpan.Path.Contains("Test0.") && expected.Path.Contains("Test.")),
Microsoft.AspNetCore.Components.Tests (1)
Routing\RouteTableFactoryTests.cs (1)
852exception.Message.Contains("The following routes are ambiguous");
Microsoft.AspNetCore.CookiePolicy.Test (1)
Transaction.cs (1)
26var authCookie = SetCookie.SingleOrDefault(c => c.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme + "="));
Microsoft.AspNetCore.Cors (1)
Infrastructure\CorsPolicyExtensions.cs (1)
22.Where(o => o.Contains($"://{_WildcardSubdomain}"))
Microsoft.AspNetCore.DataProtection (1)
TypeForwardingActivator.cs (1)
62if (originalTypeName.Contains(OldNamespace))
Microsoft.AspNetCore.DataProtection.Tests (2)
KeyManagement\XmlKeyManagerTests.cs (2)
551Assert.False(loggerFactory.ToString().Contains("1A2B3C4D"), "The secret '1A2B3C4D' should not have been logged."); 575Assert.True(loggerFactory.ToString().Contains("1A2B3C4D"), "The secret '1A2B3C4D' should have been logged.");
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Logging\AcceptanceTests.cs (2)
109if (context.Request.QueryString.Value!.Contains("status")) 114if (context.Request.QueryString.Value!.Contains("body"))
Microsoft.AspNetCore.Hosting.FunctionalTests (1)
ShutdownTests.cs (1)
83if (output.Contains(CompletionMessage))
Microsoft.AspNetCore.Http.Connections.Client (1)
HttpConnection.cs (1)
458if (urlBuilder.Query.Contains("negotiateVersion"))
Microsoft.AspNetCore.Http.Tests (10)
DefaultHttpContextTests.cs (1)
401if (property.Name.Contains("Feature"))
ResponseCookiesTest.cs (9)
140Assert.Single(deletedCookies, cookie => cookie.StartsWith("key1", StringComparison.InvariantCulture) && cookie.Contains("path=/path1/")); 141Assert.Single(deletedCookies, cookie => cookie.StartsWith("key1", StringComparison.InvariantCulture) && cookie.Contains("path=/path2/")); 142Assert.Single(deletedCookies, cookie => cookie.StartsWith("key2", StringComparison.InvariantCulture) && cookie.Contains("path=/path1/") && cookie.Contains("domain=localhost")); 143Assert.Single(deletedCookies, cookie => cookie.StartsWith("key2", StringComparison.InvariantCulture) && cookie.Contains("path=/path2/") && cookie.Contains("domain=localhost")); 170Assert.Single(deletedCookies, cookie => cookie.StartsWith("key1", StringComparison.InvariantCulture) && cookie.Contains("path=/path1/")); 171Assert.Single(deletedCookies, cookie => cookie.StartsWith("key2", StringComparison.InvariantCulture) && cookie.Contains("path=/path1/") && cookie.Contains("domain=localhost"));
Microsoft.AspNetCore.HttpLogging.Tests (193)
HttpLoggingMiddlewareTests.cs (193)
135Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 136Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 137Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 138Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 139Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 140Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 141Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Body: test")); 167Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 168Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 169Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 170Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 171Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 172Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 173Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: test")); 199Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 200Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 201Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 202Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 203Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 204Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 205Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Body: test")); 231Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 232Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Method: GET")); 233Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 234Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 235Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 236Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("QueryString: ?foo")); 237Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 238Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Body: test")); 263Assert.Contains(TestSink.Writes, w => w.Message.Contains("foo: [Redacted]")); 264Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("foo: bar")); 283Assert.Contains(TestSink.Writes, w => w.Message.Contains("foo: bar")); 284Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("foo: [Redacted]")); 285Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: [Redacted]")); 286Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 303Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody: [Not consumed by app]")); 334Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 362Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 390Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 430Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 592Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 632Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains(expected)); 633Assert.Contains(TestSink.Writes, w => w.Message.Contains("Unrecognized Content-Type for request body.")); 671Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 709Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody:")); 710Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 748Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("RequestBody:")); 784Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 785Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 786Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 787Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 788Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 789Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 790Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody: test")); 791Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 418")); 792Assert.Contains(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain")); 793Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: Hello World")); 811Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 812Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 813Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 814Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 815Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 816Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 817Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody: test")); 818Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 418")); 819Assert.Contains(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain")); 820Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: Hello World")); 821Assert.Contains(TestSink.Writes, w => w.Message.Contains("foo: bar")); 840Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 841Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 842Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 843Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 844Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 845Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 846Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody: test")); 847Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 418")); 848Assert.Contains(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain")); 849Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: Hello World")); 850Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: ReplacedPath")); 868Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 869Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 870Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Body: test")); 892Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 893Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 894Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: test")); 939Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 940Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 964Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 965Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 966Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: test")); 988Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 989Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Server: Kestrel")); 990Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Body: test")); 1012Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 1013Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 1014Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Body: test")); 1034Assert.Contains(TestSink.Writes, w => w.Message.Contains("Test: [Redacted]")); 1057Assert.Contains(TestSink.Writes, w => w.Message.Contains("Test: Kestrel")); 1058Assert.Contains(TestSink.Writes, w => w.Message.Contains("Server: [Redacted]")); 1079Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 1121Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 1151Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 1152Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 1153Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Body: test")); 1159Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: test")); 1189Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 1190Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 1191Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Body: test")); 1221Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 1242Assert.Contains(TestSink.Writes, w => w.Message.Contains("Unrecognized Content-Type for response body.")); 1257Assert.Contains(TestSink.Writes, w => w.Message.Contains("No Content-Type header for request body.")); 1296Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 101")); 1400Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: Upgrade")); 1443Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("StatusCode: 101")); 1444Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Connection: Upgrade")); 1477Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 1478Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 1479Assert.Contains(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain")); 1756Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 1757Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 1758Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 1759Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 1760Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 1761Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 1762Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody: test")); 1764Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("StatusCode: 418")); 1765Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain; p=response")); 1766Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Body: Hello World")); 1784Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 1785Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Method: GET")); 1786Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 1787Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 1788Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 1789Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 1790Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("RequestBody: test")); 1792Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 418")); 1793Assert.Contains(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain")); 1794Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: Hello World")); 1812Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 1813Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 1814Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 1815Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 1816Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 1817Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 1818Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody: test")); 1819Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 418")); 1820Assert.Contains(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain")); 1821Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: Hello World")); 1822Assert.Contains(TestSink.Writes, w => w.Message.Contains("foo: bar")); 1841Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 1842Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 1843Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 1844Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 1845Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 1846Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 1847Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody: test")); 1849Assert.DoesNotContain(TestSink.Writes, w => w.Message.Contains("StatusCode: 418")); 1850Assert.Contains(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain")); 1851Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: Hello World")); 1852Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 412")); 1865var filteredLogs = TestSink.Writes.Where(w => w.LoggerName.Contains("HttpLogging")); 1866Assert.DoesNotContain(filteredLogs, w => w.Message.Contains("Request")); 1867Assert.Contains(filteredLogs, w => w.Message.Contains("StatusCode: 200")); 1880var filteredLogs = TestSink.Writes.Where(w => w.LoggerName.Contains("HttpLogging")); 1881Assert.Contains(filteredLogs, w => w.Message.Contains("Request")); 1882Assert.Contains(filteredLogs, w => w.Message.Contains("StatusCode: 200")); 1895var filteredLogs = TestSink.Writes.Where(w => w.LoggerName.Contains("HttpLogging")); 1896Assert.DoesNotContain(filteredLogs, w => w.Message.Contains("Scheme")); 1897Assert.DoesNotContain(filteredLogs, w => w.Message.Contains("StatusCode: 200")); 1912var filteredLogs = TestSink.Writes.Where(w => w.LoggerName.Contains("HttpLogging")); 1938var filteredLogs = TestSink.Writes.Where(w => w.LoggerName.Contains("HttpLogging")); 1939Assert.Contains(filteredLogs, w => w.Message.Contains("Request")); 1940Assert.DoesNotContain(filteredLogs, w => w.Message.Contains("Accept")); 1941Assert.Contains(filteredLogs, w => w.Message.Contains("StatusCode: 200")); 1942Assert.DoesNotContain(filteredLogs, w => w.Message.Contains("Content-Type: text/plain")); 1955var filteredLogs = TestSink.Writes.Where(w => w.LoggerName.Contains("HttpLogging")); 1956Assert.DoesNotContain(filteredLogs, w => w.Message.Contains("Request")); 1957Assert.Contains(filteredLogs, w => w.Message.Contains("StatusCode: 200")); 1970var filteredLogs = TestSink.Writes.Where(w => w.LoggerName.Contains("HttpLogging")); 1971Assert.Contains(filteredLogs, w => w.Message.Contains("Request")); 1972Assert.Contains(filteredLogs, w => w.Message.Contains("StatusCode: 200")); 1985var filteredLogs = TestSink.Writes.Where(w => w.LoggerName.Contains("HttpLogging")); 1986Assert.DoesNotContain(filteredLogs, w => w.Message.Contains("Scheme")); 1987Assert.DoesNotContain(filteredLogs, w => w.Message.Contains("StatusCode: 200")); 2002var filteredLogs = TestSink.Writes.Where(w => w.LoggerName.Contains("HttpLogging")); 2028var filteredLogs = TestSink.Writes.Where(w => w.LoggerName.Contains("HttpLogging")); 2029Assert.Contains(filteredLogs, w => w.Message.Contains("Request")); 2030Assert.DoesNotContain(filteredLogs, w => w.Message.Contains("Accept")); 2031Assert.Contains(filteredLogs, w => w.Message.Contains("StatusCode: 200")); 2032Assert.DoesNotContain(filteredLogs, w => w.Message.Contains("Content-Type: text/plain")); 2074var filteredLogs = TestSink.Writes.Where(w => w.LoggerName.Contains("HttpLogging")); 2076var requestLog = Assert.Single(filteredLogs, w => w.Message.Contains("Request:")); 2080var responseLog = Assert.Single(filteredLogs, w => w.Message.Contains("Response:"));
Microsoft.AspNetCore.Identity.Test (1)
IdentityUIScriptsTest.cs (1)
142Version = cshtmlFile.Contains("V4") ? "V4" : "V5",
Microsoft.AspNetCore.InternalTesting (3)
xunit\SkipOnHelixAttribute.cs (3)
54if (Queues.Contains("All.OSX") && targetQueue.StartsWith("osx", StringComparison.OrdinalIgnoreCase)) 59if (Queues.Contains("All.Ubuntu") && targetQueue.StartsWith("ubuntu", StringComparison.OrdinalIgnoreCase)) 64if (Queues.Contains("All.Linux") && RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
Microsoft.AspNetCore.JsonPatch (1)
Internal\PathHelpers.cs (1)
17if (path.Contains("//"))
Microsoft.AspNetCore.JsonPatch.SystemTextJson (1)
Internal\PathHelpers.cs (1)
18if (path.Contains("//"))
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
TempDataInCookiesTest.cs (1)
70setCookieValues = setCookieValues.Where(cookie => cookie.Contains(CookieTempDataProvider.CookieName));
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\PageViewLocationExpander.cs (1)
45if (!location.Contains("/{1}/"))
Microsoft.AspNetCore.Mvc.TagHelpers (1)
TagHelperOutputExtensions.cs (1)
230if (!currentClassValue.Contains(encodedClassValue))
Microsoft.AspNetCore.Mvc.Test (2)
MvcServiceCollectionExtensionsTest.cs (2)
280if (implementationType != null && !implementationType.Assembly.FullName.Contains("Mvc")) 466.Where(sd => sd.ServiceType.Assembly.FullName.Contains("Mvc"))
Microsoft.AspNetCore.Mvc.ViewFeatures (5)
ExpressionHelper.cs (2)
89if (name.Contains("__")) 168Debug.Assert(!name.Contains("__"));
LambdaExpressionComparer.cs (3)
55if (memberName1.Contains("__") && memberName2.Contains("__")) 93if (memberName.Contains("__"))
Microsoft.AspNetCore.ResponseCompression.Tests (2)
ResponseCompressionMiddlewareTest.cs (2)
1294if (value.Contains(HeaderNames.AcceptEncoding)) 1313if (value.Contains(HeaderNames.AcceptEncoding))
Microsoft.AspNetCore.Server.IntegrationTesting (3)
Deployers\SelfHostDeployer.cs (1)
149if (!string.IsNullOrEmpty(dataArgs.Data) && dataArgs.Data.Contains(ApplicationStartedMessage))
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (10)
MessageBodyTests.cs (1)
839m.Message.Contains(@"Connection id ""ConnectionId"", Request id ""RequestId"": started reading request body."));
src\Servers\Kestrel\shared\KnownHeaders.cs (7)
1400{(loop.ClassName.Contains("Request") ? "" : @$"_currentKnownType = KnownHeaderType.{header.Identifier}; 1403{(!loop.ClassName.Contains("Trailers") ? $@"case {loop.Headers.Length - 1}: // Header: ""Content-Length"" 1406{(loop.ClassName.Contains("Request") ? "" : @"_currentKnownType = KnownHeaderType.ContentLength; 1413{(loop.ClassName.Contains("Request") ? "" : @"_currentKnownType = default; 1417{(loop.ClassName.Contains("Request") ? "" : @"_currentKnownType = KnownHeaderType.Unknown; 1428{(!loop.ClassName.Contains("Trailers") ? $@"_next = _collection._contentLength.HasValue ? {loop.Headers.Length - 1} : -1;" : "_next = -1;")} 1431}}{(loop.ClassName.Contains("Trailers") ? "" : $@"
src\Servers\Kestrel\shared\test\CertHelper.cs (2)
74if (cert.Subject.Contains(caName)) 91if (cert.Subject.Contains(caName))
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (6)
QuicStreamContextTests.cs (4)
45Assert.Contains(LogMessages, m => m.Message.Contains("send loop completed gracefully")); 51Assert.Contains(TestSink.Writes, m => m.Message.Contains(@"shutting down writes because: ""The QUIC transport's send loop completed gracefully."".")); 436Assert.Contains(TestSink.Writes, m => m.Message.Contains(@"shutting down writes because: ""The QUIC transport's send loop completed gracefully."".")); 480Assert.Contains(TestSink.Writes, m => m.Message.Contains(@"shutting down writes because: ""Test message""."));
src\Shared\HttpClient\HttpEventSourceListener.cs (2)
41return eventSource.Name.Contains("System.Net.Quic") || eventSource.Name.Contains("System.Net.Http");
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (23)
HubConnectionTests.cs (23)
1793Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 POST")); 1794Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 CONNECT")); 1795Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request finished HTTP/2 CONNECT")); 1852Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/1.1 POST")); 1853Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/1.1 GET")); 1854Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request finished HTTP/1.1 GET")); 1962Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 POST")); 1963Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 CONNECT")); 1964Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request finished HTTP/2 CONNECT")); 2404Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 POST") && context.Message.Contains("/negotiate?")); 2407Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 POST") && context.Message.Contains("?id=")); 2408Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request finished HTTP/2 GET") && context.Message.Contains("?id=")); 2411Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request finished HTTP/2 DELETE") && context.Message.Contains("?id=")); 2500Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 POST") && context.Message.Contains("/negotiate?")); 2503Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 POST") && context.Message.Contains("?id=")); 2504Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request finished HTTP/2 GET") && context.Message.Contains("?id="));
Microsoft.AspNetCore.SignalR.Client.Tests (7)
ResponseUtils.cs (6)
44(request.RequestUri.PathAndQuery.Contains("?id=") || request.RequestUri.PathAndQuery.Contains("&id=")); 50(request.RequestUri.PathAndQuery.Contains("?id=") || request.RequestUri.PathAndQuery.Contains("&id=")); 61(request.RequestUri.PathAndQuery.Contains("?id=") || request.RequestUri.PathAndQuery.Contains("&id="));
TestHttpMessageHandler.cs (1)
123if (request.Method.Equals(HttpMethod.Delete) && request.RequestUri.PathAndQuery.Contains("id="))
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Docker.cs (1)
98if (logOutput.Contains("Ready to accept connections"))
Microsoft.AspNetCore.StaticFiles.Tests (2)
StaticFileMiddlewareTests.cs (2)
43Assert.Contains(TestSink.Writes, w => w.Message.Contains("The WebRootPath was not found") 44&& w.Message.Contains("Static files may be unavailable."));
Microsoft.AspNetCore.Tests (3)
WebApplicationTests.cs (2)
1639args.Payload.OfType<string>().Any(p => p.Contains(guid))); 1659args.Payload.OfType<string>().Any(p => p.Contains(guid)));
WebHostTests.cs (1)
113args.Payload.OfType<string>().Any(p => p.Contains("Request starting")));
Microsoft.Cci.Extensions (2)
Writers\CSharp\CSDeclarationWriter.Fields.cs (2)
63if (name.Contains("<") || name.Contains(">"))
Microsoft.CodeAnalysis (5)
CommandLine\AnalyzerConfig.SectionNameMatching.cs (1)
99if (!sectionName.Contains("/"))
MetadataReader\MetadataTypeName.cs (2)
127Debug.Assert(!typeName.Contains(MetadataHelpers.DotDelimiterString)); 154Debug.Assert(!typeName.Contains(MetadataHelpers.DotDelimiterString) || typeName.IndexOf(MetadataHelpers.MangledNameRegionStartChar) >= 0);
SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
Microsoft.CodeAnalysis.Analyzers (11)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (3)
959=> s.Contains(MultiSentenceSeparator); 978=> s.Contains("\r") || s.Contains("\n");
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (4)
290!pattern.Contains(DefaultCSharpExtensionWithoutDot); 294!pattern.Contains(DefaultVisualBasicExtensionWithoutDot); 298!(pattern.Contains(DefaultCSharpExtensionWithoutDot) && pattern.Contains(DefaultVisualBasicExtensionWithoutDot));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
45if (!headerText.Contains("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
168if (str.Contains(","))
Microsoft.CodeAnalysis.AnalyzerUtilities (8)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (4)
290!pattern.Contains(DefaultCSharpExtensionWithoutDot); 294!pattern.Contains(DefaultVisualBasicExtensionWithoutDot); 298!(pattern.Contains(DefaultCSharpExtensionWithoutDot) && pattern.Contains(DefaultVisualBasicExtensionWithoutDot));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
45if (!headerText.Contains("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
168if (str.Contains(","))
Microsoft.CodeAnalysis.BannedApiAnalyzers (8)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (4)
290!pattern.Contains(DefaultCSharpExtensionWithoutDot); 294!pattern.Contains(DefaultVisualBasicExtensionWithoutDot); 298!(pattern.Contains(DefaultCSharpExtensionWithoutDot) && pattern.Contains(DefaultVisualBasicExtensionWithoutDot));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
45if (!headerText.Contains("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
168if (str.Contains(","))
Microsoft.CodeAnalysis.CodeStyle (9)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
568if (debuggerDisplayAttributeArguments.Any(arg => arg.Contains(member.Name)))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (4)
290!pattern.Contains(DefaultCSharpExtensionWithoutDot); 294!pattern.Contains(DefaultVisualBasicExtensionWithoutDot); 298!(pattern.Contains(DefaultCSharpExtensionWithoutDot) && pattern.Contains(DefaultVisualBasicExtensionWithoutDot));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
45if (!headerText.Contains("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
168if (str.Contains(","))
Microsoft.CodeAnalysis.CSharp (2)
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
813!unsuffixedName.Contains(".") ||
Symbols\Symbol.cs (1)
1000Debug.Assert(!s.Contains("&"));
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (3)
CommandLineTests.cs (3)
2929Assert.True(outWriter.ToString().Contains("a.cs(2,7): warning Warning01: Throwing a diagnostic for types declared")); 2931Assert.True(outWriter.ToString().Contains("warning CS8032")); 2965Assert.True(outWriter.ToString().Contains("a.cs(2,7): error Warning01: Throwing a diagnostic for types declared"));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (19)
CodeActions\ApplyChangesOperationTests.cs (10)
78var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 83var document2 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program2")); 108var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 113var document2 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program2")); 138var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 143var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 168var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 173var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 198var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 203var document2 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program2"));
NavigateTo\NavigateToSearcherTests.cs (4)
409var firstDocument = project.Documents.Single(d => d.FilePath!.Contains("file1")); 410var secondDocument = project.Documents.Single(d => d.FilePath!.Contains("file2")); 469var firstDocument = project.Documents.Single(d => d.FilePath!.Contains("file1")); 470var secondDocument = project.Documents.Single(d => d.FilePath!.Contains("file2"));
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (2)
146Assert.True(file.DocumentTitle.Contains($"[{FeaturesResources.external}]")); 150Assert.True(file.DocumentTitle.Contains($"[{FeaturesResources.embedded}]"));
Workspaces\WorkspaceTests_EditorFeatures.cs (3)
581var hasX = (await doc1Z.GetTextAsync()).ToString().Contains("X"); 656var hasX = (await doc1Z.GetTextAsync()).ToString().Contains("X"); 678var hasX = (await doc1Z.GetTextAsync()).ToString().Contains("X");
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
151var result = tree.Diagnostics.Any(d => ex.Message.Contains(d.Message));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (14)
CodeGen\CodeGenAsyncEHTests.cs (2)
4790if (statement.Contains("using")) 4867else if (statement.Contains("foreach"))
CodeGen\CodeGenAsyncLocalsTests.cs (2)
39where pair.line2.Contains("ldfld") || pair.line2.Contains("stfld")
CodeGen\CodeGenAsyncTests.cs (1)
8503var expectedAwait = notifyType.Contains("Critical") ? "UnsafeAwaitAwaiter" : "AwaitAwaiter";
CodeGen\CodeGenCheckedTests.cs (2)
2780actualIL.Contains($"System.Linq.Expressions.Expression.Convert(System.Linq.Expressions.Expression, "), 2783actualIL.Contains($"System.Linq.Expressions.Expression.ConvertChecked(System.Linq.Expressions.Expression, "),
CodeGen\CodeGenDeconstructTests.cs (1)
1614Assert.Empty(names.Where(name => name.Contains("ValueTuple")));
CodeGen\CodeGenExplicitImplementationTests.cs (2)
1005AssertEx.None(classCMembers.Select(m => m.ToString()), id => id.Contains("Q")); 1006AssertEx.None(classCMembers.Select(m => m.GetDocumentationCommentId()), id => id.Contains("Q"));
CodeGen\CodeGenLocalFunctionTests.cs (1)
30if (kvp.Key.Contains(localFunctionName))
CodeGen\WinMdDelegateTests.cs (1)
262if (fieldSymbol.Name.Contains("d1"))
Emit\DynamicAnalysis\DynamicInstrumentationTests.cs (2)
4121bool instrumented = il.Contains("CreatePayload") || il.Contains("bool[]");
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (5)
CodeGen\CodeGenMethodGroupConversionCachingTests.cs (1)
6414Assert.DoesNotContain(nestedTypes, t => t.Name.StartsWith("<") && t.Name.Contains(">O"));
Emit\LocalStateTracing\LocalStateTracingTests.cs (2)
218var isInstrumented = il.Contains(TrackerTypeName); 529Assert.False(actualIL.Contains(TrackerTypeName + ".Log"));
Emit\RuntimeProbing\ModuleCancellationTests.cs (1)
37var isInstrumented = string.Join(" ", il.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)).Contains(instrumentationIndicator);
Emit\RuntimeProbing\StackOverflowProbingTests.cs (1)
30var isInstrumented = il.Contains("System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack");
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (11)
Attributes\AttributeTests_Embedded.cs (1)
641if (!targets.Contains("Class"))
Attributes\AttributeTests_Tuples.cs (1)
259.Where(m => !m.Name.Contains("k__BackingField"))
Attributes\AttributeTests_WellKnownAttributes.cs (2)
81if (il.Contains(".locals init (")) 85if (il.Contains(".locals ("))
Diagnostics\DiagnosticAnalyzerTests.cs (1)
1539Func<string, bool> isGeneratedFile = fileName => fileName.Contains("SourceFileWithAutoGeneratedComment") || generatedFileNames.Contains(fileName);
Semantics\CollectionExpressionTests.cs (2)
1414type.Contains("T[]") || type.Contains("<T>") ? "<T>" : "";
Semantics\ParamsCollectionTests.cs (2)
5091type.Contains("T[]") || type.Contains("<T>") ? "<T>" : "";
Semantics\PatternSwitchTests.cs (2)
3254.Where(n => n.Identifier.ValueText == "q" && n.ToFullString().Contains("/*BIND*/")) 3285.Where(n => n.Identifier.ValueText == "q" && n.ToFullString().Contains("/*BIND*/"))
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\CompletionProviders\CrefCompletionProvider.cs (2)
355if (displayText.Contains("{")) 360if (displayText.Contains("("))
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
324if (xmlText == null || !xmlText.Contains(DocumentationCommentXmlNames.CompletionListElementName))
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (1)
158c => c.Kind() is SyntaxKind.SingleLineCommentTrivia && c.ToString().Contains("https://aka.ms/new-console-template"));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (14)
Semantics\BindingAwaitTests.cs (1)
1899var calls = actualIL.Split(new[] { '\n', '\r' }, System.StringSplitOptions.RemoveEmptyEntries).Where(s => s.Contains("OnCompleted")).ToArray();
Semantics\InteractiveSemanticModelTests.cs (2)
306if (exprFullText.Contains("/*</bind>*/")) 325if (exprFullText.Contains("/*<bind>*/"))
Semantics\InterpolationTests.cs (1)
2695verifier.VerifyIL("Program.<<Main>$>d__0.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext", !expression.Contains("+") ? @"
Semantics\LookupTests.cs (2)
30var position = testSrc.Contains("/*<bind>*/") ? GetPositionForBinding(tree) : GetPositionForBinding(testSrc); 39var position = testSrc.Contains("/*<bind>*/") ? GetPositionForBinding(tree) : GetPositionForBinding(testSrc);
Semantics\NativeIntegerTests.cs (1)
7876static bool usesIntPtrOrUIntPtr(string underlyingType) => underlyingType.Contains("IntPtr");
Semantics\OperatorTests.cs (1)
3213.Where(x => x.Contains("//-"))
Semantics\OverloadResolutionTestBase.cs (1)
49.Where(x => x.Contains("//-"))
Semantics\QueryTests.cs (4)
2385var fromClause1 = tree.GetCompilationUnitRoot().DescendantNodes().Where(n => (n.IsKind(SyntaxKind.FromClause)) && (n.ToString().Contains("num1"))).Single() as FromClauseSyntax; 2386var fromClause2 = tree.GetCompilationUnitRoot().DescendantNodes().Where(n => (n.IsKind(SyntaxKind.FromClause)) && (n.ToString().Contains("num2"))).Single() as FromClauseSyntax; 3377tree.GetCompilationUnitRoot().DescendantNodes(n => n.ToString().Contains("assem2")) 3386tree.GetCompilationUnitRoot().DescendantNodes(n => n.ToString().Contains("assem1"))
Semantics\RawInterpolationTests_Handler.cs (1)
1065verifier.VerifyIL("Program.<<Main>$>d__0.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext", !expression.Contains("+") ? @"
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (21)
DocumentationComments\CrefTests.cs (3)
1182string arguments = text.Contains("C()") ? "C()" : text.Contains("C") ? "C" : text.Contains("D()") ? "D()" : "D";
DocumentationComments\DocumentationCommentCompilerTests.cs (1)
7979AssertEx.None(module.GetReferencedAssemblies(), id => id.Name.Contains("GeneralPia"));
Symbols\StaticAbstractMembersInInterfacesTests.cs (17)
16823Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains("M01")).Count()); 16905Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains("M01")).Count()); 16987Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains("M01")).Count()); 17057Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains("M01")).Count()); 17132Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains("M01")).Count()); 17219Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains("M01")).Count()); 17309Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains("M01")).Count()); 17415Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains("M01")).Count()); 22218Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains(opName)).Count()); 22327Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains(opName)).Count()); 22429Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains(opName)).Count()); 25539Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().OfType<PropertySymbol>().Where(m => m.Name.Contains("M01")).Count()); 25609Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().OfType<PropertySymbol>().Where(m => m.Name.Contains("M01")).Count()); 28205Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().OfType<EventSymbol>().Where(m => m.Name.Contains("M01")).Count()); 28275Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().OfType<EventSymbol>().Where(m => m.Name.Contains("M01")).Count()); 30153Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains(opName)).Count()); 30259Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains(opName)).Count());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (23)
LexicalAndXml\RawStringLiteralLexingTests.cs (1)
167if (!markup.Contains("CS" + (int)ErrorCode.ERR_UnterminatedRawString))
Parsing\MemberDeclarationParsingTests.cs (17)
10486if (text.Contains("record struct")) 10490else if (text.Contains("record class")) 10571if (text.Contains("record struct")) 10575else if (text.Contains("record class")) 10679if (text.Contains("record struct")) 10683else if (text.Contains("record class")) 10804if (text.Contains("record struct")) 10808else if (text.Contains("record class")) 10979if (text.Contains("record struct")) 10983else if (text.Contains("record class")) 11153if (text.Contains("record struct")) 11157else if (text.Contains("record class")) 11322if (text.Contains("record struct")) 11326else if (text.Contains("record class")) 11449if (text.Contains("record struct")) 11453else if (text.Contains("record class")) 11888{{(closeCurlyLeadingTrivia.Contains("#") ? "#endif" : "")}}
Syntax\SyntaxNodeTests.cs (4)
1782Assert.True(rootNode.ToString().Contains("/*END*/")); 1783Assert.False(rootNode.ToString().Contains("/*START*/")); 1800Assert.True(rootNode.ToString().Contains("/*END*/")); 1801Assert.False(rootNode.ToString().Contains("/*START*/"));
Syntax\SyntaxRewriterTests.cs (1)
243(node.IsKind(SyntaxKind.ExpressionStatement) && node.ToString().Contains("B")) ? null : node);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (4)
CSharpTestBase.cs (2)
2111if (exprFullText.Contains(EndString)) 2130if (exprFullText.Contains(StartString))
SemanticModelTestBase.cs (2)
70if (exprFullText.Contains(endComment)) 81if (exprFullText.Contains(startComment))
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (6)
Metadata\WinMdEventTests.cs (6)
2854var implementingNormalEvent = implementingType.GetMembers().OfType<EventSymbol>().Single(e => e.Name.Contains("Normal")); 2855var implementingWinRTEvent = implementingType.GetMembers().OfType<EventSymbol>().Single(e => e.Name.Contains("WinRT")); 2878var retargetingNormalEvent = retargetingType.GetMembers().OfType<EventSymbol>().Single(e => e.Name.Contains("Normal")); 2879var retargetingWinRTEvent = retargetingType.GetMembers().OfType<EventSymbol>().Single(e => e.Name.Contains("WinRT")); 3097var normalEvent = @class.GetMembers().OfType<EventSymbol>().Single(e => e.Name.Contains("Normal")); 3098var winRTEvent = @class.GetMembers().OfType<EventSymbol>().Single(e => e.Name.Contains("WinRT"));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (15)
CodeGeneration\CodeGenerationTests.cs (8)
997input.Contains("Module") || 998input.Contains("Class") || 999input.Contains("Structure") || 1000input.Contains("Namespace") || 1001input.Contains("Sub") || 1002input.Contains("Function") || 1003input.Contains("Dim") || 1004input.Contains("Enum");
Completion\TestFileSystemCompletionHelper.cs (1)
45=> !fullPath.Contains("hidden");
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (6)
230input.Contains("Class") || 231input.Contains("Structure") || 232input.Contains("Namespace") || 233input.Contains("Sub") || 234input.Contains("Function") || 235input.Contains("Dim");
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (2)
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.TypeNames.cs (1)
283if (@namespace.Contains("."))
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\MemberAndDeclarationInfo.cs (1)
179if (member.Name.Contains("."))
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (3)
Debugger\MemberInfo\TypeImpl.cs (1)
304implementingMethod.Name.Contains(".")
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.TypeNames.cs (1)
283if (@namespace.Contains("."))
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\MemberAndDeclarationInfo.cs (1)
179if (member.Name.Contains("."))
Microsoft.CodeAnalysis.Features (6)
CodeFixes\Configuration\ConfigurationUpdater.cs (1)
606if (matchWithoutExtension.Contains(PathUtilities.GetFileName(diagnosticFilePath, false)))
Completion\Providers\AbstractDocCommentCompletionProvider.cs (2)
337if (displayText.Contains("\"")) 342if (displayText.Contains(" "))
ConvertNumericLiteral\AbstractConvertNumericLiteralCodeRefactoringProvider.cs (1)
84if (numericText.Contains(DigitSeparator))
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
568if (debuggerDisplayAttributeArguments.Any(arg => arg.Contains(member.Name)))
Testing\AbstractTestMethodFinder.cs (1)
58if (!fullyQualifiedTestName.Contains(methodSymbol.Name))
Microsoft.CodeAnalysis.Features.UnitTests (12)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
2404if (additionalText.Contains("updated"))
EditAndContinue\RudeEditDiagnosticTests.cs (10)
87Assert.False(d.GetMessage().Contains("{"), kind.ToString()); 93Assert.True(d.GetMessage().Contains("<1>"), kind.ToString()); 94Assert.True(d.GetMessage().Contains("<2>"), kind.ToString()); 95Assert.False(d.GetMessage().Contains("{"), kind.ToString()); 101Assert.True(d.GetMessage().Contains("<1>"), kind.ToString()); 102Assert.True(d.GetMessage().Contains("<2>"), kind.ToString()); 103Assert.True(d.GetMessage().Contains("<3>"), kind.ToString()); 104Assert.False(d.GetMessage().Contains("{"), kind.ToString()); 110Assert.True(d.GetMessage().Contains("<1>"), kind.ToString()); 111Assert.False(d.GetMessage().Contains("{"), kind.ToString());
EditAndContinue\WatchHotReloadServiceTests.cs (1)
176if (additionalText.Contains("updated"))
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (13)
CodeActions\CodeActionsTests.cs (3)
136var addImport = results.FirstOrDefault(r => r.Title.Contains($"using System.Threading.Tasks")); 206var inline = results.FirstOrDefault(r => r.Title.Contains($"Inline 'A()'")); 298var inline = results.FirstOrDefault(r => r.Title.Contains($"Inline 'A()'"));
Diagnostics\PullDiagnosticTests.cs (3)
663if (text.Contains("public partial class C")) 1107Assert.True(results[1].Diagnostics!.Single().Message.Contains("Source generator failed")); 1459Assert.False(results.Any(r => r.TextDocument!.DocumentUri.GetRequiredParsedUri().LocalPath.Contains(".ts")));
Workspaces\LspWorkspaceManagerTests.cs (7)
58var firstDocumentUri = testLspServer.GetCurrentSolution().Projects.First().Documents.Single(d => d.FilePath!.Contains("test1")).GetURI(); 59var secondDocumentUri = testLspServer.GetCurrentSolution().Projects.First().Documents.Single(d => d.FilePath!.Contains("test2")).GetURI(); 110var firstDocumentUri = testLspServer.GetCurrentSolution().Projects.First().Documents.Single(d => d.FilePath!.Contains("test1")).GetURI(); 112var secondDocument = testLspServer.GetCurrentSolution().Projects.First().Documents.Single(d => d.FilePath!.Contains("test2")); 148var documentUri = testLspServer.GetCurrentSolution().Projects.First().Documents.Single(d => d.FilePath!.Contains("test1")).GetURI(); 172var documentUri = testLspServer.GetCurrentSolution().Projects.First().Documents.Single(d => d.FilePath!.Contains("test1")).GetURI(); 214var documentUri = testLspServer.GetCurrentSolution().Projects.First().Documents.Single(d => d.FilePath!.Contains("test1")).GetURI();
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
ExportProviderBuilderTests.cs (1)
93var type = Assert.Single(assembly.GetTypes(), t => t.FullName?.Contains("ExportedType") == true);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (8)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (4)
290!pattern.Contains(DefaultCSharpExtensionWithoutDot); 294!pattern.Contains(DefaultVisualBasicExtensionWithoutDot); 298!(pattern.Contains(DefaultCSharpExtensionWithoutDot) && pattern.Contains(DefaultVisualBasicExtensionWithoutDot));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
45if (!headerText.Contains("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
168if (str.Contains(","))
Microsoft.CodeAnalysis.PublicApiAnalyzers (8)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (4)
290!pattern.Contains(DefaultCSharpExtensionWithoutDot); 294!pattern.Contains(DefaultVisualBasicExtensionWithoutDot); 298!(pattern.Contains(DefaultCSharpExtensionWithoutDot) && pattern.Contains(DefaultVisualBasicExtensionWithoutDot));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
45if (!headerText.Contains("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
168if (str.Contains(","))
Microsoft.CodeAnalysis.Remote.ServiceHub (6)
src\VisualStudio\Core\Def\Watson\FaultReporter.cs (6)
272var logs = CollectFilePaths(logPath, "*.svclog", shouldExcludeLogFile: (name) => !name.Contains("Roslyn") && !name.Contains("LSPClient")); 291var logs = CollectFilePaths(logPath, "*.log", shouldExcludeLogFile: (name) => !name.Contains("-" + ServiceDescriptor.ServiceNameTopLevelPrefix) && 292!name.Contains("-CodeLens") && 293!name.Contains("-ManagedLanguage.IDE.RemoteHostClient") && 294!name.Contains("-hub"));
Microsoft.CodeAnalysis.ResxSourceGenerator (8)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (4)
290!pattern.Contains(DefaultCSharpExtensionWithoutDot); 294!pattern.Contains(DefaultVisualBasicExtensionWithoutDot); 298!(pattern.Contains(DefaultCSharpExtensionWithoutDot) && pattern.Contains(DefaultVisualBasicExtensionWithoutDot));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
45if (!headerText.Contains("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
168if (str.Contains(","))
Microsoft.CodeAnalysis.Scripting (1)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCache.cs (1)
28return System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription.Contains(".NET Framework")
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
GlobalAssemblyCacheTests.cs (1)
53Assert.True(name.GetDisplayName().Contains("PublicKeyToken=b77a5c561934e089"), "PublicKeyToken matches");
Microsoft.CodeAnalysis.Test.Utilities (22)
Diagnostics\DiagnosticDescription.cs (4)
369if (argumentString.Contains("\"")) 397if (_squiggledText.Contains("\n") || _squiggledText.Contains("\\") || _squiggledText.Contains("\""))
Diagnostics\OperationTestAnalyzer.cs (2)
1516if (binary.OperatorKind == BinaryOperatorKind.Add && binary.OperatorMethod != null && binary.OperatorMethod.Name.Contains("Addition")) 1532if (unary.OperatorKind == UnaryOperatorKind.Minus && unary.OperatorMethod != null && unary.OperatorMethod.Name.Contains("UnaryNegation"))
FX\StringExtensions.cs (2)
13if (input.Contains("\n") && !input.Contains("\r\n"))
Syntax\NodeHelpers.cs (9)
48return n.GetKind().Contains("Identifier") && n.Parent != null && n.Parent.GetKind().Contains("Name"); 54return kind.EndsWith("Keyword", StringComparison.Ordinal) || (kind.Contains("Identifier") && n.Parent != null && !n.Parent.GetKind().Contains("Name")); 59return n.GetKind().Contains("Literal"); 64return n.GetKind().Contains("Comment"); 69return n.GetKind().Contains("DocumentationComment"); 75return kind.Contains("Disabled") || kind.Contains("Skipped");
Syntax\XmlHelpers.cs (4)
54if (!(f.PropertyName.Contains("Span") || f.PropertyName.Contains("Kind") || f.PropertyName.Contains("Text") || f.PropertyName.Contains("IsMissing")))
TestHelpers.cs (1)
96Debug.Assert(!result.Contains("--"));
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NamedTypeSymbol.vb (1)
168Debug.Assert(Me.IsErrorType OrElse Not (TypeOf Me Is SourceNamedTypeSymbol) OrElse Not Name.Contains("."), "type name contains dots: " + Name)
Microsoft.CodeAnalysis.Workspaces (8)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (4)
290!pattern.Contains(DefaultCSharpExtensionWithoutDot); 294!pattern.Contains(DefaultVisualBasicExtensionWithoutDot); 298!(pattern.Contains(DefaultCSharpExtensionWithoutDot) && pattern.Contains(DefaultVisualBasicExtensionWithoutDot));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
45if (!headerText.Contains("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
168if (str.Contains(","))
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
Rpc\RpcServer.cs (2)
173Contract.ThrowIfTrue(responseJson.Contains("\r") || responseJson.Contains("\n"));
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (17)
NetCoreTests.cs (2)
378if (project.OutputFilePath.Contains("net6")) 382else if (project.OutputFilePath.Contains("net5"))
NewlyCreatedProjectsFromDotNetNew.cs (2)
185if (newResult.Output.Contains("Restoring")) 195catch (InvalidOperationException ex) when (ex.Message.Contains("command: dotnet workload restore"))
src\Workspaces\MSBuild\BuildHost\Rpc\RpcServer.cs (2)
173Contract.ThrowIfTrue(responseJson.Contains("\r") || responseJson.Contains("\n"));
VisualStudioMSBuildWorkspaceTests.cs (11)
191.SingleOrDefault(mr => mr.FilePath.Contains(name)); 798var csharpLib = refs.OfType<PortableExecutableReference>().FirstOrDefault(r => r.FilePath.Contains("Microsoft.CSharp")); 1141private static readonly IEnumerable<Assembly> _defaultAssembliesWithoutCSharp = MefHostServices.DefaultAssemblies.Where(a => !a.FullName.Contains("CSharp")); 1332Assert.Contains(metaRefs, r => r is PortableExecutableReference reference && reference.Display.Contains("CSharpProject.dll")); 1351Assert.Contains(project.MetadataReferences, r => r is PortableExecutableReference reference && reference.Display.Contains("CSharpProject.dll")); 1391Assert.Contains(metaRefs, r => r is PortableExecutableReference reference && reference.Display.Contains("CSharpProject.dll")); 1427Assert.Contains(vbProject.MetadataReferences, r => r is PortableExecutableReference reference && reference.Display.Contains("CSharpProject.dll")); 2100var document = documents.Single(d => d.Name.Contains("CSharpClass")); 2127var document = documents.Single(d => d.Name.Contains("ValidAdditionalFile")); 2918Assert.False(projFileText.Contains(@"<Analyzer Include=""..\Analyzers\MyAnalyzer.dll")); 2946Assert.True(projFileText.Contains(@"<ProjectReference Include=""..\CSharpProject\CSharpProject.csproj"">"));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Options\OptionsTestInfo.cs (2)
31!fileName.Contains("Test")) 47if (field.Name.Contains("SpacingAfterMethodDeclarationName"))
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
FindAllDeclarationsTests.cs (6)
399var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, str => str.Contains("Test")).ConfigureAwait(false); 423var declarations = await SymbolFinder.FindSourceDeclarationsAsync((Project)null, str => str.Contains("Test")); 439var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, str => str.Contains("Test"), SymbolFilter.All, new CancellationToken(true)); 460var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, str => str.Contains("Test")).ConfigureAwait(false); 484await SymbolFinder.FindSourceDeclarationsAsync((Solution)null, str => str.Contains("Test")); 500await SymbolFinder.FindSourceDeclarationsAsync(solution, str => str.Contains("Test"), SymbolFilter.All, new CancellationToken(true));
SolutionTests\SolutionWithSourceGeneratorTests.cs (2)
1445Assert.True(contents.ToString().Contains("Hello, World 1!")); 1481Assert.True(contents.ToString().Contains("Hello, World 2!"));
Microsoft.DotNet.Baselines.Tasks (4)
PRCreator.cs (4)
159if (updatedFile.Key.Contains("Exclusions")) 204.Where(item => item.Path.Contains(fileNameKey)) 218content = content.Contains(line + "\n") ? content.Replace(line + "\n", "") : content.Replace(line, ""); 262.Where(item => item.Path.Contains(searchFileName))
Microsoft.DotNet.Build.Manifest.Tests (3)
BuildModelFactoryTests.cs (3)
718_buildEngine.BuildErrorEvents.Should().Contain(e => e.Message.Contains("Missing 'Kind' property on artifact missingKindArtifact.nupkg")); 729_buildEngine.BuildErrorEvents.Should().Contain(e => e.Message.Contains("No manifests to merge.")); 740_buildEngine.BuildErrorEvents.Should().Contain(e => e.Message.Contains("No manifests to merge."));
Microsoft.DotNet.Build.Tasks.Feed (1)
src\common\AzureStorageUtils.cs (1)
295if (e.Message.Contains("404 (Not Found)"))
Microsoft.DotNet.Build.Tasks.Feed.Tests (12)
ProductionChannelValidatorTests.cs (2)
442It.Is<It.IsAnyType>((v, t) => v.ToString().Contains("Failed to fetch branch classifications for build")), 452It.Is<It.IsAnyType>((v, t) => v.ToString().Contains("Error validating branch classification for build")),
PublishArtifactsInManifestTests.cs (3)
229m.Message.Contains("Validating production channel 1")); 235error.Message.Contains("Build validation failed for production channel 1")); 241warning.Message.Contains("Build validation audit failure for production channel 1"));
PublishToSymbolServerTest.cs (5)
171Assert.Contains(buildEngine.BuildMessageEvents, x => x.Message.Contains("Creating symbol request")); 172Assert.Equal(2, buildEngine.BuildMessageEvents.Where(x => x.Message.Contains("Adding directory")).Count()); 175Assert.Equal(symbolPackages.Keys.Count, buildEngine.BuildMessageEvents.Where(x => x.Message.Contains($"Extracting symbol package")).Count()); 176Assert.Equal(symbolPackages.Keys.Count, buildEngine.BuildMessageEvents.Where(x => x.Message.Contains($"Adding package")).Count()); 179Assert.Contains(buildEngine.BuildMessageEvents , x => x.Message.Contains("Skipping lib/net8.0/aztoken.dll"));
PushToBuildStorageTests.cs (2)
145e.Message.Contains($"Invalid publishing version '{task.PublishingVersion}'")); 556e.Message.Contains("##vso[artifact.upload"));
Microsoft.DotNet.Build.Tasks.Installers (3)
src\CreateWixBuildWixpack.cs (1)
544if (source.Contains("$("))
src\RpmBuilder.cs (2)
327if (fileKind.Contains("ELF 64-bit LSB")) 331else if (fileKind.Contains("ELF 32-bit LSB"))
Microsoft.DotNet.Build.Tasks.Packaging (3)
GetPackageDestination.cs (1)
94if (packageFx.Framework == FrameworkConstants.FrameworkIdentifiers.Portable && packageFx.Profile.Contains("+"))
PackageItem.cs (2)
43if (SourcePath.Contains("**")) 50sourceFile.Contains("*"))
Microsoft.DotNet.Build.Tasks.Workloads.Tests (10)
CreateVisualStudioWorkloadSetTests.cs (1)
68ITaskItem workloadSetSwixItem = createWorkloadSetTask.SwixProjects.Where(s => s.ItemSpec.Contains(@"Microsoft.NET.Workloads.9.0.100.9.0.100-baseline.1.23464.1\x64")).FirstOrDefault();
CreateVisualStudioWorkloadTests.cs (9)
76ITaskItem manifestMsiItem = createWorkloadTask.Msis.Where(m => m.ItemSpec.ToLowerInvariant().Contains("d96ba8044ad35589f97716ecbf2732fb-x64.msi")).FirstOrDefault(); 97i => i.ItemSpec.Contains("microsoft.net.sdk.emscripten.5.6.swixproj")).ItemSpec), "component.swr")); 102i => i.ItemSpec.Contains("microsoft.net.sdk.emscripten.pre.5.6.swixproj")).ItemSpec), "component.swr")); 139Assert.DoesNotContain(arm64Directories, s => s.Contains("arm64")); 143ITaskItem pythonPackSwixItem = createWorkloadTask.SwixProjects.Where(s => s.ItemSpec.Contains(@"Microsoft.Emscripten.Python.6.0.4\x64")).FirstOrDefault(); 153Assert.All(swixComponentProjects, c => Assert.True(c.ItemSpec.Contains(".pre.") && c.GetMetadata(Metadata.IsPreview) == "true" || 154!c.ItemSpec.Contains(".pre.") && c.GetMetadata(Metadata.IsPreview) == "false")); 212ITaskItem manifestMsiItem = createWorkloadTask.Msis.Where(m => m.ItemSpec.ToLowerInvariant().Contains("d96ba8044ad35589f97716ecbf2732fb-arm64.msi")).FirstOrDefault(); 232i => i.ItemSpec.Contains("microsoft.net.sdk.emscripten.5.6.swixproj")).ItemSpec), "component.swr"));
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\BaseAnalyzer.cs (1)
23var configFile = context.Options.AdditionalFiles.FirstOrDefault(file => file.Path.Contains(ConfigFileName));
Microsoft.DotNet.GenFacades (1)
TypeParser.cs (1)
46if (attributeString.Contains("TypeForwardedTo"))
Microsoft.DotNet.Helix.Client (1)
HelixApi.cs (1)
25exception is RestApiException jobListEx && jobListEx.Response.Status == 400 && jobListEx.Message.Contains("Provided Job List Uri is not accessible");
Microsoft.DotNet.Helix.Sdk (6)
CreateXHarnessAppleWorkItems.cs (1)
141TimeSpan launchTimeout = target.Contains("device") ? s_defaultDeviceLaunchTimeout : s_defaultSimulatorLaunchTimeout;
CreateXUnitWorkItems.cs (3)
109string driver = runtimeTargetFramework.Contains("core") ? $"{PathToDotnet} exec " : ""; 110string runnerName = runtimeTargetFramework.Contains("core") ? "xunit.console.dll" : "xunit.console.exe"; 114if (runtimeTargetFramework.Contains("core"))
InstallDotNetTool.cs (1)
90if (Version.Contains("*"))
ProvisioningProfileProvider.cs (1)
89if (!testTarget.Contains(targetName))
Microsoft.DotNet.Helix.Sdk.Tests (15)
CreateXHarnessAndroidWorkItemsTests.cs (4)
91.Verify(x => x.AddResourceFileToArchive<XHarnessTaskBase>(payloadArchive, It.Is<string>(s => s.Contains("xharness-helix-job.android.sh")), "xharness-helix-job.android.sh"), Times.AtLeastOnce); 93.Verify(x => x.AddResourceFileToArchive<XHarnessTaskBase>(payloadArchive, It.Is<string>(s => s.Contains("xharness-helix-job.android.ps1")), "xharness-helix-job.android.ps1"), Times.AtLeastOnce); 193.Verify(x => x.AddResourceFileToArchive<XHarnessTaskBase>(payloadArchive, It.Is<string>(s => s.Contains("xharness-helix-job.android.sh")), "xharness-helix-job.android.sh"), Times.AtLeastOnce); 195.Verify(x => x.AddResourceFileToArchive<XHarnessTaskBase>(payloadArchive, It.Is<string>(s => s.Contains("xharness-helix-job.android.ps1")), "xharness-helix-job.android.ps1"), Times.AtLeastOnce);
CreateXHarnessAppleWorkItemsTests.cs (6)
99.Verify(x => x.AddResourceFileToArchive<XHarnessTaskBase>(payloadArchive, It.Is<string>(s => s.Contains("xharness-helix-job.apple.sh")), "xharness-helix-job.apple.sh"), Times.Once); 101.Verify(x => x.AddResourceFileToArchive<XHarnessTaskBase>(payloadArchive, It.Is<string>(s => s.Contains("xharness-runner.apple.sh")), "xharness-runner.apple.sh"), Times.Once); 103.Verify(x => x.AddContentToArchive(payloadArchive, "command.sh", It.Is<string>(s => s.Contains("xharness apple test"))), Times.Once); 250.Verify(x => x.AddResourceFileToArchive<XHarnessTaskBase>(payloadArchive, It.Is<string>(s => s.Contains("xharness-helix-job.apple.sh")), "xharness-helix-job.apple.sh"), Times.Once); 252.Verify(x => x.AddResourceFileToArchive<XHarnessTaskBase>(payloadArchive, It.Is<string>(s => s.Contains("xharness-runner.apple.sh")), "xharness-runner.apple.sh"), Times.Once); 254.Verify(x => x.AddContentToArchive(payloadArchive, "command.sh", It.Is<string>(s => s.Contains("xharness apple test"))), Times.Once);
FindDotNetCliPackageTests.cs (5)
65buildEngineMock.BuildMessageEvents.Should().Contain(x => x.Message.Contains("is valid.")); 115buildEngineMock.BuildMessageEvents.Should().Contain(x => x.Message.Contains("is valid.")); 164buildEngineMock.BuildMessageEvents.Should().Contain(x => x.Message.Contains("Response status code does not indicate success: 403 (Forbidden).")); 168buildEngineMock.BuildMessageEvents.Should().NotContain(x => x.Message.Contains("is valid.")); 220buildEngineMock.BuildMessageEvents.Should().NotContain(x => x.Message.Contains("is valid."));
Microsoft.DotNet.MacOsPkg.Core (2)
AppBundle.cs (1)
62if (output.Contains("is not signed at all"))
Package.cs (1)
210if (output.Contains("Status: no signature"))
Microsoft.DotNet.Open.Api.Tools.Tests (3)
OpenApiAddURLTests.cs (1)
373Assert.True(_error.ToString().Contains("Aborting to avoid conflicts."), "Should have aborted to avoid conflicts");
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Microsoft.DotNet.SharedFramework.Sdk (1)
src\CreateFrameworkListFile.cs (1)
124if (pathParts.Length > 1 && pathParts[1].Contains("_"))
Microsoft.DotNet.SignCheckLibrary (6)
Verification\Exclusions.cs (3)
116IEnumerable<Exclusion> exclusions = _exclusions.Where(e => !e.Comment.Contains(IgnoreStrongName)); 128IEnumerable<Exclusion> doNotSignExclusions = _exclusions.Where(e => e.Comment.Contains(DoNotSign)).ToArray(); 136IEnumerable<Exclusion> noStrongNameExclusions = _exclusions.Where(e => e.Comment.Contains(IgnoreStrongName));
Verification\LinuxPackageVerifier.cs (2)
54if (!verificationOutput.Contains("Good signature")) 56if (exitCode != 0 && !verificationOutput.Contains("no signature found"))
Verification\PkgVerifier.cs (1)
81if (!error.Contains("--check-signature"))
Microsoft.DotNet.SignTool (3)
src\Configuration.cs (1)
652=> copyright != null && copyright.Contains("Microsoft");
src\VerifySignatures.cs (1)
287if (output.Contains("Good signature"))
src\ZipData.cs (1)
282string wixPath = File.ReadAllText(createFileName).Contains("light.exe")
Microsoft.DotNet.SignTool.Tests (2)
SignToolTests.cs (2)
3203fakeBuildEngine.LogErrorEvents.Should().Contain(e => e.Message.Contains("WixToolsPath must be defined to run WiX tooling")); 3219fakeBuildEngine.LogErrorEvents.Should().Contain(e => e.Message.Contains($"WixToolsPath '{totalWixToolDir}' not found."));
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Languages\angular\Angular.cs (1)
40if (itemType.Contains(" "))
Microsoft.DotNet.XUnitExtensions (1)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTestDiscoverer.cs (1)
70ITypeInfo type = testMethod.TestClass.Class.Assembly.GetTypes(false).Where(t => t.Name.Contains(symbols[0])).FirstOrDefault();
Microsoft.DotNet.XUnitV3Extensions (1)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTestDiscoverer.cs (1)
68declaringType = testMethod.TestClass.Class.Assembly.ExportedTypes.Where(t => t.Name.Contains(symbols[0])).FirstOrDefault();
Microsoft.Extensions.AI.Abstractions.Tests (2)
Utilities\AIJsonUtilitiesTests.cs (2)
497if (RuntimeInformation.FrameworkDescription.Contains(".NET Framework")) 733if (!RuntimeInformation.FrameworkDescription.Contains(".NET Framework"))
Microsoft.Extensions.AI.Integration.Tests (6)
ChatClientIntegrationTests.cs (5)
867Assert.Contains(logs, e => e.Message.Contains("What's the biggest animal?")); 868Assert.Contains(logs, e => e.Message.Contains("whale")); 920Assert.Contains(logs, e => e.Message.Contains("What is the current secret number?")); 921Assert.Contains(logs, e => e.Message.Contains("\"name\": \"GetSecretNumber\"")); 922Assert.Contains(logs, e => e.Message.Contains($"\"result\": {secretNumber}"));
VerbatimMultiPartHttpHandler.cs (1)
109if (headers.Contains("name="))
Microsoft.Extensions.AI.Templates.Tests (1)
Infrastructure\ProcessExtensions.cs (1)
14catch (InvalidOperationException ex) when (ex.Message.Contains("No process is associated with this object"))
Microsoft.Extensions.AI.Tests (62)
ChatCompletion\FunctionInvokingChatClientTests.cs (8)
642entry => Assert.True(entry.Message.Contains("Invoking Func1({") && entry.Message.Contains("\"arg1\": \"value1\"")), 643entry => Assert.True(entry.Message.Contains("Func1 invocation completed. Duration:") && entry.Message.Contains("Result: \"Result 1\""))); 648entry => Assert.True(entry.Message.Contains("Invoking Func1") && !entry.Message.Contains("arg1")), 649entry => Assert.True(entry.Message.Contains("Func1 invocation completed. Duration:") && !entry.Message.Contains("Result")));
ChatCompletion\LoggingChatClientTests.cs (16)
76entry => Assert.True(entry.Message.Contains("GetResponseAsync invoked:") && entry.Message.Contains("biggest animal")), 77entry => Assert.True(entry.Message.Contains("GetResponseAsync completed:") && entry.Message.Contains("blue whale"))); 82entry => Assert.True(entry.Message.Contains("GetResponseAsync invoked.") && !entry.Message.Contains("biggest animal")), 83entry => Assert.True(entry.Message.Contains("GetResponseAsync completed.") && !entry.Message.Contains("blue whale"))); 128entry => Assert.True(entry.Message.Contains("GetStreamingResponseAsync invoked:") && entry.Message.Contains("biggest animal")), 129entry => Assert.True(entry.Message.Contains("GetStreamingResponseAsync received update:") && entry.Message.Contains("blue")), 130entry => Assert.True(entry.Message.Contains("GetStreamingResponseAsync received update:") && entry.Message.Contains("whale")), 136entry => Assert.True(entry.Message.Contains("GetStreamingResponseAsync invoked.") && !entry.Message.Contains("biggest animal")),
Embeddings\LoggingEmbeddingGeneratorTests.cs (4)
73entry => Assert.True(entry.Message.Contains("GenerateAsync invoked:") && entry.Message.Contains("Blue whale")), 79entry => Assert.True(entry.Message.Contains("GenerateAsync invoked.") && !entry.Message.Contains("Blue whale")),
Image\LoggingImageGeneratorTests.cs (14)
78entry.Message.Contains($"{nameof(IImageGenerator.GenerateAsync)} invoked:") && 79entry.Message.Contains("A beautiful sunset") && 80entry.Message.Contains("dall-e-3")), 86entry => Assert.True(entry.Message.Contains($"{nameof(IImageGenerator.GenerateAsync)} invoked.") && !entry.Message.Contains("A beautiful sunset")), 87entry => Assert.True(entry.Message.Contains($"{nameof(IImageGenerator.GenerateAsync)} completed.") && !entry.Message.Contains("dall-e-3"))); 127entry.Message.Contains($"{nameof(IImageGenerator.GenerateAsync)} invoked:") && 128entry.Message.Contains("Make it more colorful") && 129entry.Message.Contains("dall-e-3")), 135entry => Assert.True(entry.Message.Contains($"{nameof(IImageGenerator.GenerateAsync)} invoked.") && !entry.Message.Contains("Make it more colorful")), 136entry => Assert.True(entry.Message.Contains($"{nameof(IImageGenerator.GenerateAsync)} completed.") && !entry.Message.Contains("dall-e-3")));
SpeechToText\LoggingSpeechToTextClientTests.cs (20)
79entry => Assert.True(entry.Message.Contains($"{nameof(ISpeechToTextClient.GetTextAsync)} invoked:") && entry.Message.Contains("\"speechLanguage\": \"pt\"")), 80entry => Assert.True(entry.Message.Contains($"{nameof(ISpeechToTextClient.GetTextAsync)} completed:") && entry.Message.Contains("blue whale"))); 85entry => Assert.True(entry.Message.Contains($"{nameof(ISpeechToTextClient.GetTextAsync)} invoked.") && !entry.Message.Contains("\"speechLanguage\": \"pt\"")), 86entry => Assert.True(entry.Message.Contains($"{nameof(ISpeechToTextClient.GetTextAsync)} completed.") && !entry.Message.Contains("blue whale"))); 132entry => Assert.True(entry.Message.Contains($"{nameof(ISpeechToTextClient.GetStreamingTextAsync)} invoked:") && entry.Message.Contains("\"speechLanguage\": \"pt\"")), 133entry => Assert.True(entry.Message.Contains($"{nameof(ISpeechToTextClient.GetStreamingTextAsync)} received update:") && entry.Message.Contains("blue")), 134entry => Assert.True(entry.Message.Contains($"{nameof(ISpeechToTextClient.GetStreamingTextAsync)} received update:") && entry.Message.Contains("whale")), 140entry => Assert.True(entry.Message.Contains($"{nameof(ISpeechToTextClient.GetStreamingTextAsync)} invoked.") && !entry.Message.Contains("speechLanguage")), 141entry => Assert.True(entry.Message.Contains($"{nameof(ISpeechToTextClient.GetStreamingTextAsync)} received update.") && !entry.Message.Contains("blue")), 142entry => Assert.True(entry.Message.Contains($"{nameof(ISpeechToTextClient.GetStreamingTextAsync)} received update.") && !entry.Message.Contains("whale")),
Microsoft.Extensions.ApiDescription.Client.Tests (2)
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (2)
HealthCheckPublisherHostedServiceTest.cs (2)
518options.Predicate = (r) => r.Name.Contains("Delay") && !r.Name.Contains("_2");
Microsoft.Extensions.Hosting.Testing.Tests (2)
HostingFakesExtensionsTests.cs (2)
324Assert.Contains(firstCallbackTarget, record => record.Contains(message)); 325Assert.Contains(secondCallbackTarget, record => record.Contains(message));
Microsoft.Extensions.Http.Diagnostics.Tests (3)
Latency\Internal\HttpClientLatencyLogEnricherTest.cs (3)
51mockEnrichmentPropertyBag.Verify(m => m.Add(It.Is<string>(s => s.Equals("LatencyInfo")), It.Is<string>(s => s.Contains("a/b"))), Times.Once); 73mockEnrichmentPropertyBag.Verify(m => m.Add(It.Is<string>(s => s.Equals("LatencyInfo")), It.Is<string>(s => s.Contains("a/b") && s.Contains(serverName))), Times.Once);
Microsoft.Extensions.ServiceDiscovery.Yarp (1)
ServiceDiscoveryDestinationResolver.cs (1)
69if (!addressString.Contains("://"))
Microsoft.Extensions.Telemetry.Tests (1)
Logging\SerialExtendedLoggerTests.cs (1)
33if (s != null && s.Contains("I'M ANGRY"))
Microsoft.Gen.Logging (2)
Emission\Emitter.Method.cs (2)
179if (!p.Type.Contains(".")) 203if (!p.Type.Contains("."))
Microsoft.Gen.MetadataExtractor (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
193!metricType.Keyword.Contains("struct"))
Microsoft.Gen.Metrics (4)
Emitter.cs (2)
185var accessModifier = metricMethod.MetricTypeModifiers.Contains("public") 258var accessModifier = metricMethod.Modifiers.Contains("public")
MetricFactoryEmitter.cs (1)
135var accessModifier = metricMethod.MetricTypeModifiers.Contains("public")
Parser.cs (1)
193!metricType.Keyword.Contains("struct"))
Microsoft.Gen.MetricsReports (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
193!metricType.Keyword.Contains("struct"))
Microsoft.Maui.Controls.Build.Tasks (3)
CompiledConverters\RDSourceTypeConverter.cs (1)
30 if (value.Contains(";assembly="))
CompiledMarkupExtensions\StaticExtension.cs (1)
20 if (IsNullOrEmpty(member) || !member.Contains("."))
SetPropertiesVisitor.cs (1)
577 var prefix = dataType.Contains(":") ? dataType.Substring(0, dataType.IndexOf(":", StringComparison.Ordinal)) : "";
Microsoft.Maui.Resizetizer (1)
TizenResourceXmlGenerator.cs (1)
68 if (subDir.Name.Contains("-"))
Microsoft.ML.AutoML (4)
Tuner\AutoZeroTuner.cs (4)
85if (_pipelineStrings.Any(kv => kv.Value.Contains("OneHotHashEncoding") || kv.Value.Contains("OneHotEncoding"))) 87pipelineSchemas = _pipelineStrings.Where(kv => kv.Value.Contains(config.CatalogTransformer)); 94pipelineSchemas = pipelineSchemas.Where(kv => kv.Value.Contains(config.Trainer));
Microsoft.ML.AutoML.Samples (2)
Cifar10.cs (2)
26var testImages = imageInputs.Where(f => f.ImagePath.Contains("test")); 27var trainImages = imageInputs.Where(f => f.ImagePath.Contains("train"));
Microsoft.ML.AutoML.SourceGenerator (11)
EstimatorTypeGenerator.cs (3)
25if (context.AdditionalFiles.Where(f => f.Path.Contains("code_gen_flag.json")).First() is AdditionalText text) 35var trainers = context.AdditionalFiles.Where(f => f.Path.Contains("trainer-estimators.json")) 40var transformers = context.AdditionalFiles.Where(f => f.Path.Contains("transformer-estimators.json"))
SearchSpaceGenerator.cs (2)
22if (context.AdditionalFiles.Where(f => f.Path.Contains("code_gen_flag.json")).First() is AdditionalText text) 32var searchSpacesJson = context.AdditionalFiles.Where(f => f.Path.Contains("search_space.json"))
SweepableEstimatorFactoryGenerator.cs (3)
22if (context.AdditionalFiles.Where(f => f.Path.Contains("code_gen_flag.json")).First() is AdditionalText text) 32var trainers = context.AdditionalFiles.Where(f => f.Path.Contains("trainer-estimators.json")) 37var transformers = context.AdditionalFiles.Where(f => f.Path.Contains("transformer-estimators.json"))
SweepableEstimatorGenerator.cs (3)
21if (context.AdditionalFiles.Where(f => f.Path.Contains("code_gen_flag.json")).First() is AdditionalText text) 31var estimators = context.AdditionalFiles.Where(f => f.Path.Contains("trainer-estimators.json") || f.Path.Contains("transformer-estimators.json"))
Microsoft.ML.AutoML.Tests (8)
AutoFitTests.cs (3)
37if (!_markerAutoFitContextLogTest && e.Message.Contains("[Source=ImageClassificationTrainer;")) 664var containsMessage = lastException.Message.Contains(expectedExceptionMessage); 674if (!ex.Message.Contains(expectedExceptionMessage))
AutoMLExperimentTests.cs (5)
51if (e.RawMessage.Contains("Update Running Trial")) 98if (e.Message.Contains("LightGBM objective")) 138if (e.RawMessage.Contains("Update Completed Trial")) 199if (e.RawMessage.Contains("Update Completed Trial")) 290if (e.RawMessage.Contains("Trial"))
Microsoft.ML.Core (3)
CommandLine\CmdParser.cs (1)
693arg.ItemValueType == typeof(char) || !value.Contains(":"))
Data\Repository.cs (2)
238_ectx.CheckParam(dir == null || !dir.Contains(".."), nameof(dir)); 240_ectx.CheckParam(!name.Contains(".."), nameof(name));
Microsoft.ML.Data (5)
Dirty\IniFileUtils.cs (1)
24if (!ini.Contains("Evaluators=" + numEvaluators))
Transforms\ColumnBindingsBase.cs (4)
148if (src.Contains(":")) 205if (Source.Any(x => CmdQuoter.NeedsQuoting(x) || x.Contains(","))) 230if (Source.Any(x => CmdQuoter.NeedsQuoting(x) || x.Contains(","))) 812return !source.Contains(":");
Microsoft.ML.LightGbm (3)
WrappedLightGbmBooster.cs (3)
105if (trimmed.Contains("-inf")) 107else if (trimmed.Contains("inf")) 109else if (trimmed.Contains("nan"))
Microsoft.ML.NugetPackageVersionUpdater (1)
Program.cs (1)
35if (split.Contains(PackageNamespace))
Microsoft.ML.PerformanceTests (1)
Harness\ProjectGenerator.cs (1)
70return string.Join(Environment.NewLine, File.ReadAllLines(csproj.FullName).Where(line => line.Contains("<NativeAssemblyReference")));
Microsoft.ML.ResultProcessor (4)
ResultProcessor.cs (4)
372while (i < lines.Length && !lines[i].Contains("Time elapsed(s):")) 771if (lines[i].Contains(metric)) 781if (lines[i].Contains("Time elapsed(s):") || 782lines[i].Contains("memory usage(MB):"))
Microsoft.ML.TestFramework (1)
BaseTestPredictorsMaml.cs (1)
208if (ctx.Command == Cmd.CV && ctx.ExtraArgs != null && ctx.ExtraArgs.Any(arg => arg.Contains("opf+")))
Microsoft.ML.TestFrameworkCommon (1)
Utility\PathResolver.cs (1)
72if (currentRID.Contains("arm64"))
Microsoft.ML.Tests (2)
TrainerEstimators\TreeEstimators.cs (2)
1076if (e.Message.Contains("LightGBM objective")) 1104if (e.Message.Contains("LightGBM objective"))
Microsoft.ML.TorchSharp.Tests (3)
ObjectDetectionTests.cs (1)
75if (e.Source.StartsWith("ObjectDetectionTrainer") && e.Kind == ChannelMessageKind.Info && e.Message.Contains("Loss:"))
QATests.cs (2)
114if (trainingAnswer.ToString().Contains(answer.GetValues()[0].ToString()) || answer.GetValues()[0].ToString().Contains(trainingAnswer.ToString()))
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\FileIO\FileSystem.vb (1)
2228Return New String(CharBuffer).Contains(m_SearchText)
Microsoft.VisualStudio.IntegrationTest.Setup (1)
TestTraceListener.cs (1)
112if (message?.Contains("Pretty-listing introduced errors in error-free code") ?? false)
Microsoft.VisualStudio.LanguageServices (9)
Options\VisualStudioOptionStorage.cs (2)
42Debug.Assert(!vbKey.Contains(LanguagePlaceholder)); 49=> Key.Contains(LanguagePlaceholder);
Preview\FileChange.cs (1)
135if (excerpt.Contains("\r\n"))
Watson\FaultReporter.cs (6)
272var logs = CollectFilePaths(logPath, "*.svclog", shouldExcludeLogFile: (name) => !name.Contains("Roslyn") && !name.Contains("LSPClient")); 291var logs = CollectFilePaths(logPath, "*.log", shouldExcludeLogFile: (name) => !name.Contains("-" + ServiceDescriptor.ServiceNameTopLevelPrefix) && 292!name.Contains("-CodeLens") && 293!name.Contains("-ManagedLanguage.IDE.RemoteHostClient") && 294!name.Contains("-hub"));
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Snippets\CSharpSnippetExpansionLanguageHelper.cs (1)
134else if (candidateUsing.ContainsDiagnostics && !namespaceToImport.Contains("="))
Microsoft.VisualStudio.LanguageServices.Implementation (2)
SolutionExplorer\SymbolTree\RootSymbolTreeItemSourceProvider.cs (2)
158if (!capabilities.Contains(nameof(VisualStudio.ProjectSystem.ProjectTreeFlags.SourceFile)) || 159!capabilities.Contains(nameof(VisualStudio.ProjectSystem.ProjectTreeFlags.FileOnDisk)))
OpenIdConnectSample (7)
Startup.cs (7)
56if (userAgent.Contains("CPU iPhone OS 12") || userAgent.Contains("iPad; CPU OS 12")) 66if (userAgent.Contains("Macintosh; Intel Mac OS X 10_14") && 67userAgent.Contains("Version/") && userAgent.Contains("Safari")) 76if (userAgent.Contains("Chrome/5") || userAgent.Contains("Chrome/6"))
PrepareTests (1)
TestDiscovery.cs (1)
33var workerPath = assembly.Contains("net472")
PresentationBuildTasks (5)
MS\Internal\Tasks\IncrementalCompileAnalyzer.cs (1)
226if (!CompilerState.PageMarkupFileNames.Contains(fileName))
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (4)
94return _startChars.Contains(ch.ToString()) || _endChars.Contains(ch.ToString()); 99return _startChars.Contains(ch.ToString()); 104return _endChars.Contains(ch.ToString());
PresentationFramework (5)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (4)
94return _startChars.Contains(ch.ToString()) || _endChars.Contains(ch.ToString()); 99return _startChars.Contains(ch.ToString()); 104return _endChars.Contains(ch.ToString());
System\Windows\Markup\Baml2006\WpfXamlType.cs (1)
103if (method.Name.Contains("RegisterName"))
Qdrant.ApiService (1)
Program.cs (1)
22if (collections.Any(x => x.Contains("movie_collection")))
ReachFramework (4)
Serialization\Manager\XpsOMSerializationManager.cs (2)
72serializedObject.GetType().ToString().Contains("FixedDocumentPaginator")) 78serializedObject.GetType().ToString().Contains("FixedDocumentSequencePaginator"))
Serialization\Manager\XpsSerializationManager.cs (2)
102serializedObject.GetType().ToString().Contains( "FixedDocumentPaginator") ) 108serializedObject.GetType().ToString().Contains( "FixedDocumentSequencePaginator") )
Roslyn.Diagnostics.Analyzers (9)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (4)
290!pattern.Contains(DefaultCSharpExtensionWithoutDot); 294!pattern.Contains(DefaultVisualBasicExtensionWithoutDot); 298!(pattern.Contains(DefaultCSharpExtensionWithoutDot) && pattern.Contains(DefaultVisualBasicExtensionWithoutDot));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
45if (!headerText.Contains("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
168if (str.Contains(","))
SymbolDeclaredEventMustBeGeneratedForSourceSymbols.cs (1)
157!namedType.Name.Contains("Backing") &&
Roslyn.VisualStudio.Next.UnitTests (7)
Options\VisualStudioOptionStorageTests.cs (6)
80var anyInCSharpNamespace = info.Accessors.Any(a => a.namespaceName.Contains("CSharp")); 81var anyInVisualBasicNamespace = info.Accessors.Any(a => a.namespaceName.Contains("VisualBasic")); 82var allInCSharpNamespace = info.Accessors.All(a => a.namespaceName.Contains("CSharp")); 83var allInVisualBasicNamespace = info.Accessors.All(a => a.namespaceName.Contains("VisualBasic")); 125if (info.Accessors.Any(a => a.namespaceName.Contains("CSharp"))) 129else if (info.Accessors.Any(a => a.namespaceName.Contains("VisualBasic")))
Services\PerformanceTrackerServiceTests.cs (1)
138var analyzerInfo = analyzerInfos.Single(i => i.AnalyzerId.Contains(analyzerName));
RunTests (2)
TestHistoryManager.cs (2)
95if (testResult.AutomatedTestName.Contains("WorkItemExecution")) 180var runForThisStage = runsInBuild.LastOrDefault(r => r.Name.Contains(phaseName));
ScenarioTests.Common.Tests (1)
ScenarioTestTypes.cs (1)
1281if (!certificate.IssuerName.Name.Contains(_allowedIssuerName))
Security.TransportSecurity.IntegrationTests (4)
Https\ClientCredentialTypeTests.4.1.0.cs (2)
163Assert.True(exception.Message.ToLower().Contains(message), string.Format("Expected exception message to contain: '{0}', actual message is: '{1}'", message, exception.Message)); 202Assert.True(exception.Message.ToLower().Contains(paraMessage), string.Format("Expected exception message to contain: '{0}', actual: '{1}'", paraMessage, exception.Message));
Negotiate\NegotiateStream_Http_Tests.4.1.0.cs (1)
84if (Environment.Version.Major == 5 && !OSID.AnyWindows.MatchesCurrent() && !TestProperties.GetProperty(TestProperties.ServiceUri_PropertyName).Contains("/"))
Tcp\IdentityTests.4.1.1.cs (1)
42Assert.True(exception.Message.Contains(Endpoints.Tcp_VerifyDNS_HostName), string.Format("Expected exception message contains: '{0}', actual: '{1}')", Endpoints.Tcp_VerifyDNS_HostName, exception.Message));
SignalR.Client.FunctionalTestApp (1)
Startup.cs (1)
179if (context.Request.Path.Value.Contains("/negotiate"))
Sockets.FunctionalTests (9)
src\Servers\Kestrel\test\FunctionalTests\Http2\ShutdownTests.cs (9)
158Assert.Contains(LogMessages, m => m.Message.Contains("Request finished ")); 159Assert.Contains(LogMessages, m => m.Message.Contains("is closing.")); 160Assert.Contains(LogMessages, m => m.Message.Contains("is closed. The last processed stream ID was 1.")); 200var closingMessageTask = WaitForLogMessage(m => m.Message.Contains("is closing.")).DefaultTimeout(); 207var closedMessageTask = WaitForLogMessage(m => m.Message.Contains("is closed. The last processed stream ID was 1.")).DefaultTimeout(); 217Assert.Contains(LogMessages, m => m.Message.Contains("is closing.")); 218Assert.Contains(LogMessages, m => m.Message.Contains("is closed. The last processed stream ID was 1.")); 219Assert.Contains(LogMessages, m => m.Message.Contains("Some connections failed to close gracefully during server shutdown.")); 220Assert.DoesNotContain(LogMessages, m => m.Message.Contains("Request finished in"));
System.Configuration.ConfigurationManager (2)
System\Configuration\FactoryRecord.cs (1)
271return (FactoryTypeName != null) && FactoryTypeName.Contains("System.Configuration.IgnoreSection");
System\Configuration\StringAttributeCollection.cs (1)
80if (value.Contains(",")) // string.Contains(char) is .NetCore2.1+ specific
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\DsesFilterAndTransform.cs (1)
500if (activityName != null && activityName.Contains("Activity"))
System.Diagnostics.Process (1)
System\Diagnostics\Process.Unix.cs (1)
586if (resolvedExe.Contains("kfmclient"))
System.IO.Packaging (1)
System\IO\Packaging\PackUriHelper.cs (1)
459if (partName.Contains("#")) // string.Contains(char) is .NetCore2.1+ specific
System.Net.HttpListener (2)
System\Net\Managed\HttpEndPointManager.cs (2)
102if (lp.Path.Contains("//")) 209if (lp.Path.Contains("//"))
System.Net.NetworkInformation (3)
System\Net\NetworkInformation\StringParsingHelpers.Statistics.cs (3)
224bool hasIcmp6OutErrors = fileContents.Contains("Icmp6OutErrors"); 390bool hasUdp6Errors = fileContents.Contains("Udp6SndbufErrors"); 413if (line.Contains(name))
System.Net.Requests (3)
System\Net\FtpControlStream.cs (3)
299if (entry.Command.Contains("USER")) 322&& entry.Command.Contains("PASS")) 460if (entry.Command.Contains("CWD"))
System.Private.DataContractSerialization (1)
System\Xml\XmlBaseWriter.cs (1)
440else if (text.Contains("--") || text.EndsWith('-'))
System.Private.Xml (11)
System\Xml\Core\XmlTextWriter.cs (3)
736if (null != text && text.Contains("]]>")) 762if (null != text && (text.Contains("--") || text.EndsWith('-'))) 786if (null != text && text.Contains("?>"))
System\Xml\Serialization\SoapReflectionImporter.cs (1)
787if (typeName.Contains(argument))
System\Xml\Serialization\XmlReflectionImporter.cs (1)
986if (typeName.Contains(argument))
System\Xml\XmlConvert.cs (4)
412token.Contains(" ")) 429token.Contains(" ")) 1312if (s.Length == 0 || s.Contains("##")) 1334if (s.Length == 0 || s.Contains("##"))
System\Xml\XPath\Internal\StringFunctions.cs (1)
142return s1.Contains(s2);
System\Xml\Xsl\Runtime\XsltFunctions.cs (1)
37return s1.Contains(s2);
System.Reflection.Metadata (2)
System\Reflection\Metadata\MetadataReader.cs (2)
218if (!versionString.Contains("WindowsRuntime")) 222else if (versionString.Contains("CLR"))
System.ServiceModel.Primitives (4)
System\ServiceModel\Channels\BinaryMessageEncoder.cs (2)
868!acceptEncoding.Contains(MessageEncoderCompressionHandler.GZipContentEncoding)) || 870!acceptEncoding.Contains(MessageEncoderCompressionHandler.DeflateContentEncoding)))
System\ServiceModel\Security\SecurityUtils.cs (2)
426if (principalName.Contains("@") || principalName.Contains(@"\"))
System.ServiceModel.Primitives.Tests (1)
ServiceModel\DuplexChannelFactoryTest.cs (1)
109Assert.True(exception.Message.Contains("BasicHttpBinding"),
System.Text.Json (6)
System\Text\Json\Serialization\JsonConverterOfT.ReadCore.cs (1)
82case NotSupportedException when !ex.Message.Contains(" Path: "):
System\Text\Json\Serialization\JsonConverterOfT.WriteCore.cs (1)
41case NotSupportedException when !ex.Message.Contains(" Path: "):
System\Text\Json\ThrowHelper.Serialization.cs (4)
612Debug.Assert(!message.Contains(" Path: ")); 617if (!message.Contains(propertyType.ToString())) 640Debug.Assert(!message.Contains(" Path: ")); 645if (!message.Contains(propertyType.ToString()))
System.Windows.Forms (4)
System\Resources\ResXDataNode.cs (3)
355|| (typeName.Contains("System.Byte[]") && (typeName.Contains("mscorlib") || typeName.Contains("System.Private.CoreLib"))))
System\Windows\Forms\ComponentModel\COM2Interop\COM2PictureConverter.cs (1)
25if (property.DISPID == PInvokeCore.DISPID_MOUSEICON || property.Name.Contains("Icon"))
System.Windows.Forms.Design (6)
System\Windows\Forms\Design\Behavior\SnapLine.cs (2)
139if (line1.Filter.Contains(Margin)) 153if (line1.Filter.Contains(Padding))
System\Windows\Forms\Design\ControlDesigner.cs (1)
2500stack = string.Join(Environment.NewLine, exceptionLines.Where(l => l.Contains(typeName)));
System\Windows\Forms\Design\FlowPanelDesigner.cs (1)
23&& line.Filter?.Contains(SnapLine.Padding) == true)
System\Windows\Forms\Design\StandardMenuStripVerb.cs (2)
133if (name.Contains("Separator")) 297if (name.Contains("Separator"))
System.Windows.Forms.Design.Tests (2)
System\Windows\Forms\Design\FlowPanelDesignerTests.cs (2)
44snapLines.Should().NotContain(line => line.Filter is object && line.Filter.Contains(SnapLine.Padding)); 55snapLines.Should().Contain(line => line.Filter == null || !line.Filter.Contains(SnapLine.Padding));
System.Windows.Forms.Tests (1)
System\Windows\Forms\MonthCalendarTests.cs (1)
4481typeof(MonthCalendar).GetMethod(methodName).Invoke(calendar, methodName.Contains("All") ? null : new object[] { new DateTime(2022, 1, 1) });
System.Windows.Forms.UI.IntegrationTests (3)
DragDropTests.cs (2)
1108&& fileNames.Length > 0 && fileNames[0].Contains(DragAcceptRtf)) 1123&& fileNames.Length > 0 && fileNames[0].Contains(DragAcceptRtf))
ListControlUnboundActionListTests.cs (1)
28if (form.Text.Contains(nameof(ListViewItem)))
System.Xaml (4)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (4)
94return _startChars.Contains(ch.ToString()) || _endChars.Contains(ch.ToString()); 99return _startChars.Contains(ch.ToString()); 104return _endChars.Contains(ch.ToString());
Templates.Blazor.Tests (12)
src\ProjectTemplates\Shared\Project.cs (6)
137if (errorOnRestoreError && (restoreExecution.Output.Contains("Restore failed.") || restoreExecution.Error.Contains("Restore failed."))) 163if (execution.Output.Contains(": warning") || execution.Error.Contains(": warning")) 186if (errorOnBuildWarning && (execution.Output.Contains(": warning") || execution.Error.Contains(": warning")))
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (4)
122if (!(proc.Output.Contains($" {templateName} ") || proc.Output.Contains($",{templateName}") || proc.Output.Contains($"{templateName},"))) 138if (!proc.Error.Contains("No templates or subcommands found matching:"))
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Templates.Blazor.WebAssembly.Auth.Tests (15)
src\ProjectTemplates\Shared\Project.cs (6)
137if (errorOnRestoreError && (restoreExecution.Output.Contains("Restore failed.") || restoreExecution.Error.Contains("Restore failed."))) 163if (execution.Output.Contains(": warning") || execution.Error.Contains(": warning")) 186if (errorOnBuildWarning && (execution.Output.Contains(": warning") || execution.Error.Contains(": warning")))
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (4)
122if (!(proc.Output.Contains($" {templateName} ") || proc.Output.Contains($",{templateName}") || proc.Output.Contains($"{templateName},"))) 138if (!proc.Error.Contains("No templates or subcommands found matching:"))
src\Shared\E2ETesting\WebDriverExtensions.cs (3)
37if (entry.Message.Contains("favicon.ico")) 43if (entry.Message.Contains("WASM: wasm streaming compile failed: TypeError: Could not download wasm module")) 47if (entry.Message.Contains("WASM: falling back to ArrayBuffer instantiation"))
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Templates.Blazor.WebAssembly.Tests (15)
src\ProjectTemplates\Shared\Project.cs (6)
137if (errorOnRestoreError && (restoreExecution.Output.Contains("Restore failed.") || restoreExecution.Error.Contains("Restore failed."))) 163if (execution.Output.Contains(": warning") || execution.Error.Contains(": warning")) 186if (errorOnBuildWarning && (execution.Output.Contains(": warning") || execution.Error.Contains(": warning")))
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (4)
122if (!(proc.Output.Contains($" {templateName} ") || proc.Output.Contains($",{templateName}") || proc.Output.Contains($"{templateName},"))) 138if (!proc.Error.Contains("No templates or subcommands found matching:"))
src\Shared\E2ETesting\WebDriverExtensions.cs (3)
37if (entry.Message.Contains("favicon.ico")) 43if (entry.Message.Contains("WASM: wasm streaming compile failed: TypeError: Could not download wasm module")) 47if (entry.Message.Contains("WASM: falling back to ArrayBuffer instantiation"))
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Templates.Mvc.Tests (15)
src\ProjectTemplates\Shared\Project.cs (6)
137if (errorOnRestoreError && (restoreExecution.Output.Contains("Restore failed.") || restoreExecution.Error.Contains("Restore failed."))) 163if (execution.Output.Contains(": warning") || execution.Error.Contains(": warning")) 186if (errorOnBuildWarning && (execution.Output.Contains(": warning") || execution.Error.Contains(": warning")))
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (4)
122if (!(proc.Output.Contains($" {templateName} ") || proc.Output.Contains($",{templateName}") || proc.Output.Contains($"{templateName},"))) 138if (!proc.Error.Contains("No templates or subcommands found matching:"))
src\Shared\E2ETesting\WebDriverExtensions.cs (3)
37if (entry.Message.Contains("favicon.ico")) 43if (entry.Message.Contains("WASM: wasm streaming compile failed: TypeError: Could not download wasm module")) 47if (entry.Message.Contains("WASM: falling back to ArrayBuffer instantiation"))
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Templates.Tests (15)
src\ProjectTemplates\Shared\Project.cs (6)
137if (errorOnRestoreError && (restoreExecution.Output.Contains("Restore failed.") || restoreExecution.Error.Contains("Restore failed."))) 163if (execution.Output.Contains(": warning") || execution.Error.Contains(": warning")) 186if (errorOnBuildWarning && (execution.Output.Contains(": warning") || execution.Error.Contains(": warning")))
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (4)
122if (!(proc.Output.Contains($" {templateName} ") || proc.Output.Contains($",{templateName}") || proc.Output.Contains($"{templateName},"))) 138if (!proc.Error.Contains("No templates or subcommands found matching:"))
src\Shared\E2ETesting\WebDriverExtensions.cs (3)
37if (entry.Message.Contains("favicon.ico")) 43if (entry.Message.Contains("WASM: wasm streaming compile failed: TypeError: Could not download wasm module")) 47if (entry.Message.Contains("WASM: falling back to ArrayBuffer instantiation"))
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Test.Utilities (8)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (4)
290!pattern.Contains(DefaultCSharpExtensionWithoutDot); 294!pattern.Contains(DefaultVisualBasicExtensionWithoutDot); 298!(pattern.Contains(DefaultCSharpExtensionWithoutDot) && pattern.Contains(DefaultVisualBasicExtensionWithoutDot));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
45if (!headerText.Contains("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
168if (str.Contains(","))
Text.Analyzers (8)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
106if (text.Contains(autoGenerated)) 137if (text.Contains(autoGenerated))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (4)
290!pattern.Contains(DefaultCSharpExtensionWithoutDot); 294!pattern.Contains(DefaultVisualBasicExtensionWithoutDot); 298!(pattern.Contains(DefaultCSharpExtensionWithoutDot) && pattern.Contains(DefaultVisualBasicExtensionWithoutDot));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
45if (!headerText.Contains("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
168if (str.Contains(","))
UIAutomationClientSideProviders (6)
MS\Internal\AutomationProxies\WindowsScroll.cs (1)
230if (classname.ToLower(System.Globalization.CultureInfo.InvariantCulture).Contains("richedit"))
MS\Internal\AutomationProxies\WindowsScrollBar.cs (2)
556if (classname.ToLower(System.Globalization.CultureInfo.InvariantCulture).Contains("richedit")) 666if (classname.ToLower(System.Globalization.CultureInfo.InvariantCulture).Contains("richedit"))
MS\Internal\AutomationProxies\WindowsTab.cs (1)
724&& Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32"))
MS\Internal\AutomationProxies\WindowsUpDown.cs (2)
294return Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32"); 625hwndParent = Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32") ? hwndParent : IntPtr.Zero;
WinFormsControlsTest (9)
DragDrop.cs (9)
116if (files.All(file => file.Contains("NyanCat") && file.Contains(".bmp"))) 128else if (files.Length == 1 && files.Any(file => file.Contains("DragAccept.rtf"))) 162&& files.All(file => file.Contains("NyanCat") && file.Contains(".bmp"))) 254&& files.Length > 0 && files[0].Contains("DragAccept.rtf")) 296&& files.Length > 0 && files[0].Contains("DragAccept.rtf")) 320&& fileNames.Length > 0 && fileNames[0].Contains("DragAccept.rtf")) 349&& fileNames.Length > 0 && fileNames[0].Contains("DragAccept.rtf"))