562 references to Contains
AnalyzerRunner (1)
CodeRefactoringRunner.cs (1)
234language => refactorings.Where(refactoring => refactoring.Metadata.Languages.Contains(language)).ToImmutableArray());
Aspire.Dashboard.Tests (1)
Integration\ResponseCompressionTests.cs (1)
54Assert.Contains(response.Content.Headers, h => h.Key == "Content-Encoding" && h.Value.Contains("br"));
Aspire.Hosting (2)
ApplicationModel\ResourceNotificationService.cs (1)
227KnownResourceStates.TerminalStates.Contains(snapshot.State?.Text) ||
Dcp\DcpHostService.cs (1)
211if (key is not null && val is not null && !s_doNotInheritEnvironmentVars.Contains(key))
Aspire.Hosting.Dapr (1)
CommandLineBuilder.cs (1)
161bool hasReservedChars = value.Any(c => s_reservedChars.Contains(c)) == true;
Aspire.Workload.Tests (1)
WorkloadTestsBase.cs (1)
397else if (s_charsToReplace.Contains((char)b))
blazor-devserver (1)
Server\Program.cs (1)
41["ApplyCopHeaders"] = args.Contains("--apply-cop-headers").ToString()
BoundTreeGenerator (1)
BoundNodeClassWriter.cs (1)
288return !_typeMap.Values.Contains(node.Name);
ClientSample (1)
Program.cs (1)
15if (args.Contains("--debug"))
CodeGenerator (25)
FeatureCollectionGenerator.cs (3)
35internal protected {feature}? _current{feature};")}{(allFeatures.Where(f => !implementedFeatures.Contains(f)).FirstOrDefault() is not null ? @" 37// Other reserved feature slots" : "")}{Each(allFeatures.Where(f => !implementedFeatures.Contains(f)), feature => $@" 47{Each(allFeatures.Where(f => !implementedFeatures.Contains(f)), feature => $@"
src\Servers\Kestrel\shared\KnownHeaders.cs (22)
177.OrderBy(header => !requestPrimaryHeaders.Contains(header)) 181ClassName = FormattedInternalHeaderNames.Select(x => x.Name).Contains(header) ? "InternalHeaderNames" : "HeaderNames", 184PrimaryHeader = requestPrimaryHeaders.Contains(header), 185ExistenceCheck = requestHeadersExistence.Contains(header), 186FastCount = requestHeadersCount.Contains(header), 193PrimaryHeader = requestPrimaryHeaders.Contains(HeaderNames.ContentLength) 248.OrderBy(header => !responsePrimaryHeaders.Contains(header)) 252ClassName = FormattedInternalHeaderNames.Select(x => x.Name).Contains(header) ? "InternalHeaderNames" : "HeaderNames", 255EnhancedSetter = enhancedHeaders.Contains(header), 256ExistenceCheck = responseHeadersExistence.Contains(header), 257PrimaryHeader = responsePrimaryHeaders.Contains(header) 264EnhancedSetter = enhancedHeaders.Contains(HeaderNames.ContentLength), 265PrimaryHeader = responsePrimaryHeaders.Contains(HeaderNames.ContentLength) 275.OrderBy(header => !responsePrimaryHeaders.Contains(header)) 279ClassName = FormattedInternalHeaderNames.Select(x => x.Name).Contains(header) ? "InternalHeaderNames" : "HeaderNames", 282EnhancedSetter = enhancedHeaders.Contains(header), 283ExistenceCheck = responseHeadersExistence.Contains(header), 284PrimaryHeader = responsePrimaryHeaders.Contains(header) 298.Where(header => invalidH2H3ResponseHeaders.Contains(header.Name)) 303.Where(header => FormattedInternalHeaderNames.Where(x => x.IsPseudoHeader).Select(x => x.Identifier).Contains(header.Identifier)) 906{Each(loop.Headers.Where(header => header.Name != HeaderNames.ContentLength && !NonApiHeaders.Contains(header.Identifier)), header => $@" 937{Each(ApiHeaderNames.Where(header => header != "ContentLength" && !loop.Headers.Select(kh => kh.Identifier).Contains(header)), header => $@"
CodeStyleConfigFileGenerator (4)
Program.cs (4)
168isEnabledInNonDefaultMode = !rule.CustomTags.Contains(s_neverTag); 173isEnabledInNonDefaultMode = rule.CustomTags.Contains(s_highlyRecommendedTag); 178isEnabledInNonDefaultMode = rule.CustomTags.Contains(s_highlyRecommendedTag) || rule.CustomTags.Contains(s_recommendedTag);
dotnet-dev-certs (1)
Program.cs (1)
48if (args.Contains("--debug"))
dotnet-openapi (1)
Commands\BaseCommand.cs (1)
488var packages = attributes.Where(a => a.CodeGenerators.Contains(generator));
dotnet-svcutil-lib (8)
CmdCredentialsProvider.cs (2)
154if (!_validatedClientCerts.Keys.Contains(certhash)) 225if (!_validatedServerCerts.Keys.Contains(certhash))
CommandProcessorOptions.cs (1)
631if (!references.Contains(this.References[idx]))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (1)
485if (Enumerable.Contains(s_knownSerializableTypeNames, type.FullName))
Shared\MSBuildProj.cs (3)
970if (!propertyNames.All(p => this._resolvedProperties.Keys.Contains(p))) 972var propertyTable = this._resolvedProperties.Where(p => propertyNames.Contains(p.Key)); 985return this._resolvedProperties.Where(p => propertyNames.Contains(p.Key));
Shared\ProjectPropertyResolver.cs (1)
246if (string.IsNullOrWhiteSpace(propertyName) || propertyName.Any(c => chars.Contains(c) || !char.IsLetterOrDigit(c)))
GenerateRulesMissingDocumentation (1)
Program.cs (1)
84if (!actualContent.Contains(line))
GetDocument.Insider (1)
Commands\GetDocumentCommandWorker.cs (1)
267if (!documentNames.Contains(_context.DocumentName))
http2cat (1)
src\Shared\Http2cat\Http2Utilities.cs (1)
1039if (!collection.Contains(value))
Identity.DefaultUI.WebSite (2)
Program.cs (1)
17if (!args.Contains("--use-startup=false"))
src\Identity\test\InMemory.Test\InMemoryUserStore.cs (1)
417if (splitCodes.Contains(code))
IIS.FunctionalTests (5)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (1)
32if (!enabledCodes.Contains(code.ToString(CultureInfo.InvariantCulture)))
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestPathBaseTests.cs (1)
96if (headers.Contains("Transfer-Encoding: chunked"))
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (2)
312if (headers.Contains("Content-Length: 5")) 803if (headers.Contains("Transfer-Encoding: chunked"))
src\Shared\Http2cat\Http2Utilities.cs (1)
1039if (!collection.Contains(value))
IIS.LongTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (1)
32if (!enabledCodes.Contains(code.ToString(CultureInfo.InvariantCulture)))
src\Shared\Http2cat\Http2Utilities.cs (1)
1039if (!collection.Contains(value))
IIS.NewHandler.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (1)
32if (!enabledCodes.Contains(code.ToString(CultureInfo.InvariantCulture)))
src\Shared\Http2cat\Http2Utilities.cs (1)
1039if (!collection.Contains(value))
IIS.NewShim.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (1)
32if (!enabledCodes.Contains(code.ToString(CultureInfo.InvariantCulture)))
src\Shared\Http2cat\Http2Utilities.cs (1)
1039if (!collection.Contains(value))
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (1)
32if (!enabledCodes.Contains(code.ToString(CultureInfo.InvariantCulture)))
IISExpress.FunctionalTests (5)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (1)
32if (!enabledCodes.Contains(code.ToString(CultureInfo.InvariantCulture)))
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestPathBaseTests.cs (1)
96if (headers.Contains("Transfer-Encoding: chunked"))
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (2)
312if (headers.Contains("Content-Length: 5")) 803if (headers.Contains("Transfer-Encoding: chunked"))
src\Shared\Http2cat\Http2Utilities.cs (1)
1039if (!collection.Contains(value))
illink (4)
ILLink.CodeFixProvider (2)
DynamicallyAccessedMembersCodeFixProvider.cs (2)
114 addAsReturnAttribute: AttributeOnReturn.Contains (diagnostic.Id), 115 addGenericParameterAttribute: AttributeOnGeneric.Contains (diagnostic.Id),
Infrastructure.Common (1)
ConditionalWcfTest.cs (1)
57else if (TestProperties.PropertyNames.Contains(conditionName))
installer.tasks (10)
GenerateTestSharedFrameworkDepsFile.cs (1)
122if (ridFallback.Contains(runtime))
RegenerateDownloadTable.cs (6)
56if (readmeLines.Contains(Begin(LinksComment)) && 57readmeLines.Contains(End(LinksComment))) 85if (readmeLines.Contains(Begin(TableComment)) && 86readmeLines.Contains(End(TableComment))) 148if (links.Contains(link)) 152if (links.Contains(checksum))
StaticFileRegeneration\RegenerateThirdPartyNotices.cs (2)
155.Where(s => !newSections.Contains(s)) 171.Where(r => r.Content?.Sections.Contains(s) == true)
StaticFileRegeneration\TpnSectionHeader.cs (1)
18return line.Length > 2 && line.All(c => SectionSeparatorChars.Contains(c));
Microsoft.AspNetCore.Antiforgery.Test (7)
DefaultAntiforgeryTest.cs (7)
386.Contains(ResponseCacheHeadersOverrideWarningMessage); 404.Contains(ResponseCacheHeadersOverrideWarningMessage); 422.Contains(ResponseCacheHeadersOverrideWarningMessage); 440.Contains(ResponseCacheHeadersOverrideWarningMessage); 1302.Contains(ResponseCacheHeadersOverrideWarningMessage); 1341.Contains(ResponseCacheHeadersOverrideWarningMessage); 1375.Contains(ResponseCacheHeadersOverrideWarningMessage);
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\Infrastructure\ExportProviderExtensions.cs (1)
34var importMany = contract.MetadataConstraints.Contains(new KeyValuePair<string, object>("IsImportMany", true));
Microsoft.AspNetCore.Authorization.Test (1)
DefaultAuthorizationServiceTests.cs (1)
819if (_allowed.Contains(requirement))
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
Builder\RazorComponentsEndpointConventionBuilderExtensionsTest.cs (1)
241var webJSEndpoint = Assert.Single(endpoints, e => e.Metadata.Contains(obj));
RazorComponentsServiceCollectionExtensionsTest.cs (2)
29if (singleRegistrationServiceTypes.Contains(service.ServiceType)) 58if (singleRegistrationServiceTypes.Contains(service.ServiceType))
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
RequestDelegateGenerator.cs (1)
23predicate: static (node, _) => node.TryGetMapMethodName(out var method) && InvocationOperationExtensions.KnownMethods.Contains(method),
RequestDelegateGeneratorSuppressor.cs (1)
52|| !InvocationOperationExtensions.KnownMethods.Contains(method))
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (2)
DbUtil.cs (2)
48if (!columns.Contains(property.GetColumnName(StoreObjectIdentifier.Table(table, property.DeclaringType.GetSchema())))) 73if (!columns.Contains(reader.GetString(0)))
Microsoft.AspNetCore.Identity.InMemory.Test (1)
InMemoryUserStore.cs (1)
417if (splitCodes.Contains(code))
Microsoft.AspNetCore.InternalTesting (1)
TestFileOutputContext.cs (1)
129if (InvalidFileChars.Contains(c))
Microsoft.AspNetCore.InternalTesting.Tests (1)
AssemblyTestLogTests.cs (1)
395var strippedPrefix = line.Contains('[') ? line.Substring(line.IndexOf('[')) : line;
Microsoft.AspNetCore.Mvc.Core.Test (2)
ApplicationModels\ControllerActionDescriptorProviderTests.cs (1)
649.Contains(method));
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (1)
95if (singleRegistrationServiceTypes.Contains(service.ServiceType))
Microsoft.AspNetCore.Mvc.Test (1)
MvcServiceCollectionExtensionsTest.cs (1)
266if (singleRegistrationServiceTypes.Contains(service.ServiceType))
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
DefaultHtmlGenerator.cs (2)
1174if (_placeholderInputTypes.Contains(suppliedTypeString)) 1179if (_maxLengthInputTypes.Contains(suppliedTypeString))
Microsoft.AspNetCore.OpenApi (1)
Extensions\JsonNodeSchemaExtensions.cs (1)
194schema[OpenApiSchemaKeywords.NullableKeyword] = openApiSchema.Nullable || (schema[OpenApiSchemaKeywords.TypeKeyword] is JsonArray schemaType && schemaType.GetValues<string>().Contains("null"));
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
src\Shared\Http2cat\Http2Utilities.cs (1)
1039if (!collection.Contains(value))
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (22)
src\Servers\Kestrel\shared\KnownHeaders.cs (22)
177.OrderBy(header => !requestPrimaryHeaders.Contains(header)) 181ClassName = FormattedInternalHeaderNames.Select(x => x.Name).Contains(header) ? "InternalHeaderNames" : "HeaderNames", 184PrimaryHeader = requestPrimaryHeaders.Contains(header), 185ExistenceCheck = requestHeadersExistence.Contains(header), 186FastCount = requestHeadersCount.Contains(header), 193PrimaryHeader = requestPrimaryHeaders.Contains(HeaderNames.ContentLength) 248.OrderBy(header => !responsePrimaryHeaders.Contains(header)) 252ClassName = FormattedInternalHeaderNames.Select(x => x.Name).Contains(header) ? "InternalHeaderNames" : "HeaderNames", 255EnhancedSetter = enhancedHeaders.Contains(header), 256ExistenceCheck = responseHeadersExistence.Contains(header), 257PrimaryHeader = responsePrimaryHeaders.Contains(header) 264EnhancedSetter = enhancedHeaders.Contains(HeaderNames.ContentLength), 265PrimaryHeader = responsePrimaryHeaders.Contains(HeaderNames.ContentLength) 275.OrderBy(header => !responsePrimaryHeaders.Contains(header)) 279ClassName = FormattedInternalHeaderNames.Select(x => x.Name).Contains(header) ? "InternalHeaderNames" : "HeaderNames", 282EnhancedSetter = enhancedHeaders.Contains(header), 283ExistenceCheck = responseHeadersExistence.Contains(header), 284PrimaryHeader = responsePrimaryHeaders.Contains(header) 298.Where(header => invalidH2H3ResponseHeaders.Contains(header.Name)) 303.Where(header => FormattedInternalHeaderNames.Where(x => x.IsPseudoHeader).Select(x => x.Identifier).Contains(header.Identifier)) 906{Each(loop.Headers.Where(header => header.Name != HeaderNames.ContentLength && !NonApiHeaders.Contains(header.Identifier)), header => $@" 937{Each(ApiHeaderNames.Where(header => header != "ContentLength" && !loop.Headers.Select(kh => kh.Identifier).Contains(header)), header => $@"
Microsoft.AspNetCore.SignalR.Core (4)
DefaultHubLifetimeManager.cs (4)
264DefaultHubLifetimeManager<THub>.SendToGroupConnections(methodName, args, group, (connection, state) => !((IReadOnlyList<string>)state!).Contains(connection.ConnectionId), excludedConnectionIds, ref tasks, ref message, cancellationToken); 318return SendToAllConnections(methodName, args, (connection, state) => !((IReadOnlyList<string>)state!).Contains(connection.ConnectionId), excludedConnectionIds, cancellationToken); 324return SendToAllConnections(methodName, args, (connection, state) => ((IReadOnlyList<string>)state!).Contains(connection.ConnectionId), connectionIds, cancellationToken); 330return SendToAllConnections(methodName, args, (connection, state) => ((IReadOnlyList<string>)state!).Contains(connection.UserIdentifier), userIds, cancellationToken);
Microsoft.AspNetCore.SignalR.StackExchangeRedis (2)
RedisHubLifetimeManager.cs (2)
465if (invocation.ExcludedConnectionIds == null || !invocation.ExcludedConnectionIds.Contains(connection.ConnectionId)) 626if (invocation.ExcludedConnectionIds?.Contains(groupConnection.ConnectionId) == true)
Microsoft.Build (12)
BackEnd\Components\Scheduler\Scheduler.cs (1)
1636blockingRequest.RequestsWeAreBlockedBy.Contains(blockedRequest))
BackEnd\Shared\BuildResult.cs (1)
554if (!targetsToKeep.Contains(target))
BuildCheck\Infrastructure\BuildEventsProcessor.cs (1)
250if (!checkWrapper.Check.SupportedRules.Contains(result.CheckRule))
Evaluation\IntrinsicFunctions.cs (1)
642if (c >= 32 && c <= 126 && !FileUtilities.InvalidFileNameChars.Contains(c))
FileMatcher.cs (2)
2638if (directorySeparatorCharacters.Contains(possibleParent[possibleParent.Length - 1])) 2644return directorySeparatorCharacters.Contains(possibleChild[possibleParent.Length]);
FrameworkLocationHelper.cs (4)
635ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion); 645ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion); 670ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion); 680ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion);
Graph\ProjectInterpretation.cs (1)
264if (outerBuildReferencingProject.ProjectReferences.Contains(innerBuild))
ReadOnlyCollection.cs (1)
121return _backing.Contains<T>(item);
Microsoft.Build.Engine.UnitTests (1)
ProjectCache\ProjectCacheTests.cs (1)
1480foreach (var node in graph.ProjectNodes.Where(n => referenceNumbers.Contains(GetProjectNumber(n))))
Microsoft.Build.Framework (2)
ChangeWaves.cs (2)
141else if (_cachedWave == EnableAllFeatures || AllWaves.Contains(_cachedWave)) 173Debug.Assert(_runningTests || AllWaves.Contains(wave), $"Change wave version {wave} is invalid");
Microsoft.Build.Tasks.Core (4)
FileMatcher.cs (2)
2638if (directorySeparatorCharacters.Contains(possibleParent[possibleParent.Length - 1])) 2644return directorySeparatorCharacters.Contains(possibleChild[possibleParent.Length]);
ReadOnlyCollection.cs (1)
121return _backing.Contains<T>(item);
Unzip.cs (1)
336patterns = pattern.Contains(';')
Microsoft.Build.UnitTests.Shared (2)
ObjectModelHelpers.cs (2)
1800? nodes.Where(n => entryPoints.Contains(n.Key)).Select(n => n.Value.ProjectPath) 1824if (nodeDependencies.Value?.Contains(node) == true)
Microsoft.Build.Utilities.Core (6)
FileMatcher.cs (2)
2638if (directorySeparatorCharacters.Contains(possibleParent[possibleParent.Length - 1])) 2644return directorySeparatorCharacters.Contains(possibleChild[possibleParent.Length]);
FrameworkLocationHelper.cs (4)
635ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion); 645ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion); 670ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion); 680ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion);
Microsoft.Cci.Extensions (1)
Experimental\FilteredAssembly.cs (1)
461return this.Members.Contains(member);
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1071Debug.Assert(suppressableDiagnostics.Contains(diagnostic));
Microsoft.CodeAnalysis.CodeStyle (22)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (4)
552if (!ineligibleFieldUsages.All(loc => loc.Ancestors().Contains(result.PropertyDeclaration))) 572NonConstructorLocations(writeLocations1).Any(loc => !loc.Ancestors().Contains(result.PropertyDeclaration))) 585NonConstructorLocations(writeLocations2).Any(loc => !loc.Ancestors().Contains(result.PropertyDeclaration))) 630if (!node.AncestorsAndSelf().Contains(propertyDeclaration))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
263&& kinds.Contains(symbol.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
727type?.AllInterfaces.Contains(iDisposableType) == true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
174return node.GetAncestorsOrThis<SyntaxNode>().Contains(child);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
266var match = list.FirstOrDefault(o => o != null && o.Tokens.Contains(token));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (12)
261Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 263Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 285Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 287Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 297Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 299Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 307Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 309Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 319Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalNode)); 321Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newNode)); 628Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 630Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (2)
34if (sequence.Contains((T)null!)) 64if (list.Contains((T)null!))
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
148.Any(nameAttributes => nameAttributes.Select(GetValueFromNameAttribute).Contains(name));
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
213if (!ContainingType.Interfaces.OfType<INamedTypeSymbol>().Contains(TypeToGenerateIn))
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
89fieldDeclarators.Contains(declarator)
Microsoft.CodeAnalysis.CSharp (6)
CommandLine\CSharpCompiler.cs (1)
268return args.Any(arg => new[] { "/noconfig", "-noconfig" }.Contains(arg.ToLowerInvariant()));
Compilation\CSharpDiagnosticFilter.cs (1)
76if (s_alinkWarnings.Contains((ErrorCode)d.Code) &&
Symbols\Metadata\PE\PENamedTypeSymbol.cs (2)
1004Debug.Assert(!nonEventFields.Contains(associatedField)); 1526=> MemberNames.Contains(WellKnownMemberNames.CloneMethodName);
Symbols\Source\SourceAssemblySymbol.cs (1)
2403bool foundBadWildcard = _compilation.IsEmitDeterministic && verString?.Contains('*') == true;
Symbols\Source\SourceLocalSymbol.cs (1)
175Contains(nodeToBind.Ancestors().OfType<StatementSyntax>().First().Kind()) ||
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
238type.AllInterfaces.Contains(convertedType)) 261if (IsWellKnownCollectionInterface(convertedType) && type.AllInterfaces.Contains(convertedType))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
450if (attributes.Contains(attributeToRemove))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (5)
128stringValue.Contains('E') || stringValue.Contains('e') || stringValue.Contains('.') || 129stringValue.Contains('+') || stringValue.Contains('-');
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SyntaxTokenListExtensions.cs (1)
13=> tokenList.SkipWhile(t => kinds.Contains(t.Kind()));
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (4)
CommandLineTests.cs (4)
2438if (expectedEmbedded.Contains("embed.cs")) 2443if (expectedEmbedded.Contains("embed2.cs")) 2448if (expectedEmbedded.Contains("embed.xyz")) 11622var isDeterministic = extraArgs.Contains("/deterministic");
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (2)
195if (changedDocumentIds.Contains(refDocumentId)) 204Assert.True(changedDocumentIds.Contains(refDocumentId));
Workspaces\WorkspaceTests_EditorFeatures.cs (1)
289Assert.True(snapshot.GetProject(id1).ProjectReferences.Contains(reference), "ProjectReferences did not contain project2");
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (37)
Semantics\OutVarTests.cs (19)
20902compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 21015compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 21116compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 21214compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 21348compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 21579compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 21776compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 21978compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22129compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22224compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22391compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22558compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22652compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22766compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22857compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22941compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 23002compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 31261compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 31434compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify(
Semantics\PatternMatchingTests_Scope.cs (18)
11789compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 11880compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 11975compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 12067compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 12189compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 12409compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 12600compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 12799compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 12944compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13033compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13194compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13355compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13438compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13517compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13603compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13682compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13743compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13918compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify(
Microsoft.CodeAnalysis.CSharp.Features (4)
Diagnostics\Analyzers\CSharpSimplifyTypeNamesDiagnosticAnalyzer.cs (1)
53Debug.Assert(context.CodeBlock.DescendantNodesAndSelf().Contains(root));
EncapsulateField\CSharpEncapsulateFieldService.cs (1)
76.WithModifiers([PrivateKeyword, .. fieldSyntax.Modifiers.Where(m => !modifierKinds.Contains(m.Kind()))])
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
238type.AllInterfaces.Contains(convertedType)) 261if (IsWellKnownCollectionInterface(convertedType) && type.AllInterfaces.Contains(convertedType))
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\LookupPositionTests.cs (1)
3177string[] curr = prev.Where(x => !removed.Contains(x)).ToArray();
Semantics\NullableContextTests.cs (2)
576Assert.Equal(isNullableEnabledForMethod, actualAnalyzedKeys.Contains("Main")); 734bool expectedAnalysis = expectedAnalyzedKeys.Contains(methodDeclaration.Identifier.Text);
Semantics\VarianceTests.cs (2)
115if (!validAssignments[i].Contains(j)) 228if (!validAssignments[i].Contains(j))
SourceGeneration\GeneratorDriverTests.cs (1)
2588Assert.True(compilation.SyntaxTrees.Contains(node.SyntaxTree));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Compilation\CompilationAPITests.cs (5)
1195Assert.True(comp.References.Contains(compRef1)); 1196Assert.True(comp.References.Contains(compRef2)); 1204Assert.True(comp.References.Contains(ref1)); 1209Assert.True(comp.References.Contains(ref2)); 1214Assert.True(comp.References.Contains(compRef2));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxNodeTests.cs (1)
477if (!directiveKinds.Contains(kind))
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
450if (attributes.Contains(attributeToRemove))
Microsoft.CodeAnalysis.EditorFeatures (5)
EditorConfigSettings\Updater\SettingsUpdateHelper.cs (4)
277return language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && splicedFileExtensions.Contains("cs") && splicedFileExtensions.Length == 1; 282return language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && splicedFileExtensions.Contains("vb") && splicedFileExtensions.Length == 1; 287return language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && splicedFileExtensions.Contains("vb") && splicedFileExtensions.Contains("cs");
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (1)
197_activeSpan = _activeSpan.HasValue && spans.Contains(_activeSpan.Value)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeActions\CodeChangeProviderMetadataTests.cs (1)
182.Where(part => ((string[])part.Export.Metadata["Languages"]!).Contains(language));
EmbeddedLanguages\StackFrame\StackFrameSyntaxFactory.cs (1)
107Assert.True(s.Contains('.'));
Microsoft.CodeAnalysis.ExternalAccess.Xaml (1)
Internal\ClientCapabilityProvider.cs (1)
26=> _clientCapabilities.TextDocument?.Completion?.CompletionListSetting?.ItemDefaults?.Contains("data") == true;
Microsoft.CodeAnalysis.Features (22)
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (1)
111.Contains(compilation.GetTypeByMetadataName("System.Diagnostics.DebuggerDisplayAttribute"));
CodeFixes\Configuration\ConfigurationUpdater.cs (6)
619splicedFileExtensions.Contains("cs") && splicedFileExtensions.Contains("vb")) 626if (_language.Equals(LanguageNames.CSharp) && splicedFileExtensions.Contains("cs")) 630else if (_language.Equals(LanguageNames.VisualBasic) && splicedFileExtensions.Contains("vb")) 642if ((_language.Equals(LanguageNames.CSharp) && splicedFileExtensions.Contains("cs")) || 643(_language.Equals(LanguageNames.VisualBasic) && splicedFileExtensions.Contains("vb")))
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
111if (property.Ancestors().Contains(typeBlock))
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (2)
279if (collectionType.TypeKind == TypeKind.Interface && knownCollectionInterfaces.Contains(collectionType.OriginalDefinition)) 295if (!knownCollectionInterfaces.Contains(current.OriginalDefinition))
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (1)
474return containingFunction.AncestorsAndSelf().Contains(forStatement);
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (1)
552if (symbolSyntax.Ancestors().Contains(typeDeclaration))
Snippets\SnippetFunctionService.cs (2)
103if (!xmlFunctionText.Contains('(') || 104!xmlFunctionText.Contains(')') ||
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer.cs (1)
88Debug.Assert(option is { Definition.DefaultValue: ICodeStyleOption2 } == descriptor.CustomTags.Contains(WellKnownDiagnosticTags.CustomSeverityConfigurable));
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
207if (descriptor.CustomTags.Contains(WellKnownDiagnosticTags.NotConfigurable))
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (3)
572NonConstructorLocations(writeLocations1).Any(loc => !loc.Ancestors().Contains(result.PropertyDeclaration))) 585NonConstructorLocations(writeLocations2).Any(loc => !loc.Ancestors().Contains(result.PropertyDeclaration))) 630if (!node.AncestorsAndSelf().Contains(propertyDeclaration))
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
148.Any(nameAttributes => nameAttributes.Select(GetValueFromNameAttribute).Contains(name));
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
213if (!ContainingType.Interfaces.OfType<INamedTypeSymbol>().Contains(TypeToGenerateIn))
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
89fieldDeclarators.Contains(declarator)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Options\NamingStyleTestUtilities.cs (1)
37if (excludeNodes != null && excludeNodes.Contains(element.Name.LocalName))
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
635if (pathParts.Contains(ThisDirectory))
Microsoft.CodeAnalysis.LanguageServer (1)
ExportProviderBuilder.cs (1)
192var hasUnexpectedErroredParts = erroredParts.Any(part => !expectedErroredParts.Contains(part));
Microsoft.CodeAnalysis.LanguageServer.Protocol (11)
Handler\CodeActions\CodeActionResolveHelper.cs (3)
93if (!resourceOperations.Contains(ResourceOperationKind.Delete)) 104if (!resourceOperations.Contains(ResourceOperationKind.Create)) 115if (!resourceOperations.Contains(ResourceOperationKind.Rename))
Handler\Completion\CompletionCapabilityHelper.cs (4)
42SupportDefaultEditRange = completionSetting?.CompletionListSetting?.ItemDefaults?.Contains(EditRangePropertyName) == true; 43SupportsMarkdownDocumentation = completionSetting?.CompletionItem?.DocumentationFormat?.Contains(MarkupKind.Markdown) == true; 44SupportCompletionListData = completionSetting?.CompletionListSetting?.ItemDefaults?.Contains(DataPropertyName) == true; 45SupportDefaultCommitCharacters = completionSetting?.CompletionListSetting?.ItemDefaults?.Contains(CommitCharactersPropertyName) == true;
Handler\Hover\HoverHandler.cs (2)
49var supportsMarkdown = clientCapabilities?.TextDocument?.Hover?.ContentFormat?.Contains(MarkupKind.Markdown) == true; 63var supportsMarkdown = clientCapabilities?.TextDocument?.Hover?.ContentFormat?.Contains(MarkupKind.Markdown) == true;
Handler\SemanticTokens\SemanticTokensSchema.cs (1)
101.Where(tokenType => !SemanticTokenTypes.AllTypes.Contains(tokenType))
LspServices\AbstractExportLspServiceAttribute.cs (1)
60Contract.ThrowIfFalse(serviceType.GetInterfaces().Contains(typeof(ILspService)), $"{serviceType.Name} does not inherit from {nameof(ILspService)}");
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
ProtocolConversionsTests.cs (2)
34if (invalidFileNameChars.Contains(c)) 43var expectedAbsoluteUri = "file:///" + uriPrefix + (unescaped.Contains(c) ? c : "%" + ((int)c).ToString("X2")) + "/";
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
DeterministicKeyBuilderTests.cs (1)
58.Where(x => ignoreSections.Contains(x.Name))
Microsoft.CodeAnalysis.Test.Utilities (3)
Assert\EqualityUtil`1.cs (1)
135Assert.True(type.GetTypeInfo().ImplementedInterfaces.Contains(targetType));
Compilation\CompilationExtensions.cs (1)
148var isAddedSymbol = new Func<ISymbol, bool>(s => allAddedSymbols?.Contains(s) ?? false);
TargetFrameworkUtil.cs (1)
400.Where(x => !(x is PortableExecutableReference pe && excludeReferenceNames.Contains(pe.FilePath)));
Microsoft.CodeAnalysis.UnitTests (14)
Collections\ImmutableSegmentedListTest.cs (6)
377Assert.False(list2.Contains(30)); 381Assert.False(list2.Contains(100)); 385Assert.False(list2.Contains(10)); 387list2 = list2.RemoveAll(removeList.Contains); 389Assert.False(list2.Contains(20)); 390Assert.False(list2.Contains(70));
Collections\List\ICollection.Generic.Tests.cs (3)
568if (!IsReadOnly && !AddRemoveClear_ThrowsNotSupported && DefaultValueAllowed && !Enumerable.Contains(InvalidValues, default(T))) 592while (collection.Contains(value) || Enumerable.Contains(InvalidValues, value)) 603if (!IsReadOnly && !AddRemoveClear_ThrowsNotSupported && DefaultValueAllowed && !Enumerable.Contains(InvalidValues, default(T)))
Collections\List\IList.NonGeneric.Tests.cs (4)
51while (collection.Contains(toAdd) || InvalidValues.Contains(toAdd)) 878if (!IsReadOnly && !ExpectedFixedSize && NullAllowed && !Enumerable.Contains(InvalidValues, null)) 902while (list.Contains(value) || Enumerable.Contains(InvalidValues, value)) 921if (!IsReadOnly && !ExpectedFixedSize && NullAllowed && !Enumerable.Contains(InvalidValues, null))
PEWriter\InstructionOperandTypesTests.cs (1)
27foreach (FieldInfo fi in typeof(OpCodes).GetFields(BindingFlags.Public | BindingFlags.Static).Where(f => !reserved.Contains(f.Name)))
Microsoft.CodeAnalysis.Workspaces (32)
CodeRefactorings\ExportCodeRefactoringProviderAttribute.cs (1)
49if (kind == null || !s_documentKindNames.Contains(kind))
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (1)
88var referencingProjects = new HashSet<ProjectId>(solution.Projects.Where(p => p.MetadataReferences.Contains(reference)).Select(p => p.Id));
Log\KeyValueLogMessage.cs (3)
131Debug.Assert(str != null && !str.Contains(PairSeparator) && !str.Contains(KeyValueSeparator) && !str.Contains(ItemSeparator));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
727type?.AllInterfaces.Contains(iDisposableType) == true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
174return node.GetAncestorsOrThis<SyntaxNode>().Contains(child);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
266var match = list.FirstOrDefault(o => o != null && o.Tokens.Contains(token));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (12)
261Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 263Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 285Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 287Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 297Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 299Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 307Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 309Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 319Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalNode)); 321Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newNode)); 628Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 630Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (2)
34if (sequence.Contains((T)null!)) 64if (list.Contains((T)null!))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
182declaration = await SelectFirstOrDefaultAsync(declarations, token.GetRequiredParent().AncestorsAndSelf().Contains, cancellationToken).ConfigureAwait(false);
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
1303return _projectSystemProjectFactory.Workspace.CurrentSolution.GetRequiredProject(Id).AllProjectReferences.Contains(projectReference);
Workspace\Solution\ProjectDependencyGraph_AddProjectReference.cs (1)
180if (referencedProjectIds.Contains(projectIdToUpdate) || existingReverseTransitiveReferences?.Overlaps(referencedProjectIds) == true)
Workspace\Solution\Solution.cs (2)
884if (this.SolutionState.AnalyzerReferences.Contains(analyzerReference)) 904if (!this.SolutionState.AnalyzerReferences.Contains(analyzerReference))
Workspace\Solution\SolutionCompilationState.CompilationTracker.CompilationTrackerState.cs (2)
105Contract.ThrowIfTrue(this.CompilationWithoutGeneratedDocuments.SyntaxTrees.Contains(generatedDocument.GetSyntaxTree(CancellationToken.None))); 205Contract.ThrowIfTrue(compilationWithoutGeneratedDocuments.SyntaxTrees.Contains(generatedDocument.GetSyntaxTree(CancellationToken.None)));
Workspace\Workspace.cs (3)
1481if (!project.ProjectReferences.Contains(newProjRef)) 2451if (!solution.AnalyzerReferences.Contains(analyzerReference)) 2462if (solution.AnalyzerReferences.Contains(analyzerReference))
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildWorkspace.cs (1)
633if (!project.MetadataReferences.Contains(metadataReference))
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
VisualStudioMSBuildWorkspaceTests.cs (2)
1898Assert.True(options.PreprocessorSymbolNames.Contains("EnableMyAttribute")); 1921Assert.False(options.PreprocessorSymbolNames.Contains("EnableMyAttribute"));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Workspaces\TestWorkspace_XmlConsumption.cs (1)
367if (!Services.SupportedLanguages.Contains(languageName))
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\SolutionTests.cs (1)
2853Assert.True(compilation.References.Contains(meta), "Compilation references were expected to contain " + meta);
Microsoft.DotNet.Build.Tasks.Feed (2)
src\model\SetupTargetFeedConfigV3.cs (1)
136if (PublishingConstants.InstallersAndChecksums.Contains(type))
src\model\TargetChannelConfig.cs (1)
175if (assets == AssetSelection.All && contentTypes.Contains(TargetFeedContentType.Package))
Microsoft.DotNet.Build.Tasks.Workloads (1)
Swix\SwixComponent.cs (1)
200if (pack.IsAlias && pack.AliasTo != null && !pack.AliasTo.Keys.Any(rid => s_SupportedRids.Contains(rid)))
Microsoft.DotNet.GenFacades (6)
GenPartialFacadeSourceGenerator.cs (1)
53referenceTypes = referenceTypes.Where(type => !OmitTypes.Contains(type));
NotSupportedAssemblyGenerator.cs (4)
118if (_exclusionApis != null && _exclusionApis.Contains(GetMethodDefinition(node))) 135if (_exclusionApis != null && _exclusionApis.Contains(GetPropertyDefinition(node))) 143if (_exclusionApis != null && _exclusionApis.Contains(GetEventDefinition(node))) 151if (_exclusionApis != null && _exclusionApis.Contains(GetFullyQualifiedName(node)))
SourceGenerator.cs (1)
73if (_seedTypePreferences.Keys.Contains(type))
Microsoft.DotNet.Helix.Sdk.Tests (2)
InstallDotNetToolTests.cs (2)
238It.Is<IEnumerable<string>>(args => args.All(y => _expectedArgs.Contains(y))))) 309It.Is<IEnumerable<string>>(args => args.Count() == _expectedArgs.Count() && args.All(y => _expectedArgs.Contains(y)))),
Microsoft.DotNet.NuGetRepack.Tasks (1)
src\NuGetVersionUpdater.cs (1)
196bool isSemVer1 = packageVersion.Release.Contains('-');
Microsoft.DotNet.SharedFramework.Sdk (1)
src\GenerateSharedFrameworkDepsFile.cs (1)
103.Where(expansion => expansion.Contains(RuntimeIdentifier))
Microsoft.DotNet.SignCheckLibrary (2)
Verification\ExeVerifier.cs (1)
27if (PEHeader.ImageSectionHeaders.Select(s => s.SectionName).Contains(".wixburn"))
Verification\Jar\JarAttributes.cs (1)
57if (line.Contains(':'))
Microsoft.DotNet.SignTool (1)
src\BatchSignUtil.cs (1)
629if (_itemsToSkipStrongNameCheck.Contains(file.FileName))
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\ValidateUsageAgainstBaseline.cs (1)
100.Where(u => diff.Added.Contains(u.GetIdentityWithoutRid()))
Microsoft.DotNet.VersionTools (1)
Dependencies\BuildOutput\BuildDependencyInfo.cs (1)
42.Where(pair => !disabledPackages.Contains(pair.Key))
Microsoft.DotNet.XliffTasks (1)
Model\XamlRuleDocument.cs (1)
110if (localizableProperties.Contains(attribute.Name.LocalName))
Microsoft.Extensions.Configuration (1)
ConfigurationManager.cs (1)
311return _properties.Contains(item);
Microsoft.Extensions.FileProviders.Embedded.Tests (1)
TestAssembly.cs (1)
59return Files.Contains(name) ? Stream.Null : null;
Microsoft.Extensions.Http.Diagnostics.Tests (4)
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (2)
38lcti2.Verify(a => a.GetCheckpointToken(It.Is<string>(s => !HttpCheckpoints.Checkpoints.Contains(s))), Times.Never); 39lcti2.Verify(a => a.GetCheckpointToken(It.Is<string>(s => HttpCheckpoints.Checkpoints.Contains(s))));
Latency\Internal\HttpRequestLatencyListenerTest.cs (2)
36lcti.Verify(a => a.GetCheckpointToken(It.Is<string>(s => !HttpCheckpoints.Checkpoints.Contains(s))), Times.Never); 37lcti.Verify(a => a.GetCheckpointToken(It.Is<string>(s => HttpCheckpoints.Checkpoints.Contains(s))));
Microsoft.Extensions.Http.Resilience (1)
Polly\HttpRetryStrategyOptionsExtensions.cs (1)
59return !methods.Contains(request.Method);
Microsoft.Extensions.Identity.Core (1)
UserValidator.cs (1)
62userName.Any(c => !manager.Options.User.AllowedUserNameCharacters.Contains(c)))
Microsoft.Extensions.Identity.Stores (1)
UserStoreBase.cs (1)
976if (splitCodes.Contains(code))
Microsoft.Gen.Logging (1)
Parsing\TypeSymbolExtensions.cs (1)
74symbols.IgnorePropertiesSymbols.Contains(typeSymbol);
Microsoft.Interop.SourceGeneration (3)
TypeSymbolExtensions.cs (3)
332if (typeName.Contains('<') || typeName.Contains('+') || typeName.Contains('/'))
Microsoft.Maui (1)
VisualDiagnostics\VisualDiagnosticsOverlay.cs (1)
54 if (!ScrollViews.Contains(scrollBar))
Microsoft.Maui.Controls (20)
BindingExpression.cs (1)
407 if (bindablePropertyField != null && bindablePropertyField.FieldType == typeof(BindableProperty) && sourceType.ImplementedInterfaces.Contains(typeof(IElementController)))
BindingExpressionHelper.cs (2)
34 if (stringValue.EndsWith(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator, StringComparison.Ordinal) && DecimalTypes.Contains(convertTo)) 41 if (stringValue == "-0" && DecimalTypes.Contains(convertTo))
Compatibility\Handlers\FlyoutPage\iOS\PhoneFlyoutPageRenderer.cs (2)
257 if (_clickOffView != null && _clickOffView.GestureRecognizers.Contains(_tapGesture)) 266 if (View != null && View.GestureRecognizers.Contains(_panGesture))
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (2)
404 if (flyoutDetail != null && parentPages.Append((Page)Element).Contains(flyoutDetail.Detail)) 896 if (Element.Navigation.NavigationStack.Contains(pageBeingRemoved))
Compatibility\Handlers\Shell\iOS\ShellSectionRenderer.cs (2)
512 if (!calledFromDispose && tracker.ViewController != null && ActiveViewControllers().Contains(tracker.ViewController)) 606 if (_pendingViewControllers.Contains(viewController))
Embedding\EmbeddingExtensions.cs (1)
77 if (embeddedApp.Application is Application app && !app.Windows.Contains(window))
ListProxy.cs (1)
81 return _items.Values.Contains(item);
MultiPage.cs (1)
351 if (selected == null || !ItemsSource.Cast<object>().Contains(selected))
NavigationPage\NavigationPage.cs (1)
528 var rootPage = this.FindParentWith(x => (x is IWindow te || Window.Navigation.ModalStack.Contains(x)), true);
ReadOnlyListAdapter.cs (1)
63 return _list.Contains(value);
ResourceDictionary.cs (1)
169 || (_mergedInstance != null && _mergedInstance.Contains(item));
Shell\BaseShellItem.cs (1)
133 return shell.GetItems().Contains(this);
Shell\ShellItem.cs (1)
265 if (CurrentItem == null && ((IShellItemController)this).GetItems().Contains(child))
Shell\ShellSection.cs (2)
423 if (Navigation.ModalStack.Contains(navStack[navStack.Count - 1])) 696 if (CurrentItem == null && ((IShellSectionController)this).GetItems().Contains(child))
StyleSheets\TextReaderExtensions.cs (1)
66 if (limit != null && limit.Contains(c))
Microsoft.Maui.Controls.Build.Tasks (3)
SetPropertiesVisitor.cs (1)
245 attributes.FirstOrDefault(cad => ContentPropertyAttribute.ContentPropertyTypes.Contains(cad.AttributeType.FullName));
TypeReferenceExtensions.cs (2)
227 if (arrayInterfaces.Contains(baseClass.FullName)) 230 arrayGenericInterfaces.Contains(baseClass.ResolveCached(cache).FullName) &&
Microsoft.Maui.Controls.Compatibility (1)
Tizen\Platform.cs (1)
225 return _navModel.Modals.FirstOrDefault() == page || _navModel.Roots.Contains(parent);
Microsoft.Maui.Controls.SourceGen (1)
CodeBehindGenerator.cs (1)
486 if (!new[] { "private", "public", "internal", "protected" }.Contains(accessModifier)) //quick validation
Microsoft.Maui.Controls.Xaml (1)
ApplyPropertiesVisitor.cs (1)
291 attributes.FirstOrDefault(cad => ContentPropertyAttribute.ContentPropertyTypes.Contains(cad.AttributeType.FullName));
Microsoft.Maui.Essentials (1)
Preferences\Preferences.shared.cs (1)
288 if (!SupportedTypes.Contains(type))
Microsoft.ML.AutoML (8)
API\AutoCatalog.cs (1)
825var booleanFeatures = columnPurposes.Where(c => c.Purpose == ColumnPurpose.NumericFeature && !numericFeatures.Contains(c));
Experiment\OptimizingMetricInfo.cs (3)
31IsMaximizing = !_minimizingRegressionMetrics.Contains(regressionMetric); 36IsMaximizing = !_minimizingBinaryMetrics.Contains(binaryMetric); 41IsMaximizing = !_minimizingMulticlassMetrics.Contains(multiMetric);
TrainerExtensions\TrainerExtensionCatalog.cs (1)
107trainers = trainers.Where(t => allowList.Contains(GetTrainerName(t)));
TrainerExtensions\TrainerExtensionUtil.cs (2)
92var boosterParams = sweepParams.Where(p => _lightGbmBoosterParamNames.Contains(p.Name)); 170var boosterParams = sweepParams.Where(p => _lightGbmBoosterParamNames.Contains(p.Name));
Utils\UserInputValidationUtil.cs (1)
150if (columns?.Contains(null) == true)
Microsoft.ML.AutoML.Tests (1)
Utils\TaskAgnosticIterationResult.cs (1)
76if (!supportedTypes.Contains(metric.GetType()))
Microsoft.ML.Core (6)
ComponentModel\ComponentCatalog.cs (5)
741.Where(info => info.SignatureTypes.Contains(typeSig) && typeBase.IsAssignableFrom(info.Type)) 784.Where(ci => ci.LoadNames.Select(n => n.ToLowerInvariant().Trim()).Contains(name)) 793.Where(ci => ci.SignatureTypes.Contains(typeof(TSig))) 803.Where(ci => ci.ArgType == typeof(TArgs) && ci.SignatureTypes.Contains(typeof(TSig))) 875component = _components.FirstOrDefault(x => x.InterfaceType == interfaceType && (x.Name == alias || (x.Aliases != null && x.Aliases.Contains(alias))));
Utilities\ReservoirSampler.cs (1)
195Contracts.Assert(_counts.Contains(0));
Microsoft.ML.Data (17)
DataLoadSave\Text\TextLoader.cs (4)
1245if (!options.AllowQuoting && options.DecimalMarker == ',' && _separators.Contains(',')) 1249if (_separators.Contains(_escapeChar)) 1456if (_separators.Contains(':')) 1471host.CheckDecode(!_separators.Contains(_escapeChar));
DataLoadSave\Text\TextLoaderParser.cs (1)
1359Contracts.Assert(_seps.Contains(span[ichCur]));
DataView\CompositeRowToRowMapper.cs (2)
64bool wantsActive = activeIndices.Contains(c); 78deps[deps.Length - 1] = OutputSchema.Where(c => activeIndices.Contains(c.Index));
DataView\TypedCursor.cs (2)
193return col => _columnIndices.Contains(col) || additionalColumnsPredicate(col); 208var inputs = _data.GetRowCursorSet(_data.Schema.Where(col => _columnIndices.Contains(col.Index) || additionalColumnsPredicate(col.Index)), n, rand);
Dirty\PredictionUtils.cs (1)
74if (!arg.Contains(';') || arg.IndexOfAny(_dontSplitChars) >= 0)
Scorers\FeatureContributionCalculation.cs (1)
371if (activeColumns.Select(c => c.Index).Contains(_outputGenericSchema.Count))
Scorers\SchemaBindablePredictorWrapper.cs (1)
241if (activeColumns.Select(c => c.Index).Contains(0))
Transforms\ColumnBindingsBase.cs (1)
190if (src.Contains(':'))
Transforms\ColumnSelecting.cs (4)
102_selectPredicate = (name) => (keepColumns != null) ? keepColumns.Contains(name) : !dropColumns.Contains(name); 463var missing = selectColumns.Where(x => !inputColumns.Contains(x)); 605if (selectedColumns.Contains(inputSchema[colIdx].Name))
Microsoft.ML.FastTree (3)
TreeEnsembleFeaturizer.cs (3)
195if (activeIndices.Contains(OutputSchema[_treesColumnName].Index)) 205if (activeIndices.Contains(OutputSchema[_leavesColumnName].Index)) 215if (activeIndices.Contains(OutputSchema[_pathsColumnName].Index))
Microsoft.ML.GenAI.LLaMA (1)
Llama3_1ChatTemplateBuilder.cs (1)
28if (messages.Any(m => m.GetRole() is null || availableRoles.Contains(m.GetRole()!.Value) == false))
Microsoft.ML.GenAI.Phi (1)
Phi3\Phi3ChatTemplateBuilder.cs (1)
33if (messages.Any(m => m.GetRole() is null || availableRoles.Contains(m.GetRole()!.Value) == false))
Microsoft.ML.InternalCodeAnalyzer (1)
ContractsCheckNameofFixProvider.cs (1)
156if (shortName.Split(',').Contains(nameArgValue))
Microsoft.ML.OnnxConverter (1)
OnnxExportExtensions.cs (1)
31if (!outputColumnNamesToKeep.Contains(sink.Schema[i].Name))
Microsoft.ML.SearchSpace (2)
Parameter.cs (1)
334return (_value as Dictionary<string, Parameter>).Contains(item);
SearchSpace.cs (1)
304Contract.Assert(supportTypes.Contains(type) || type.IsEnum, $"[Option:{optionName}] ChoiceAttribute can only apply to enum or the following types {string.Join(",", supportTypes.Select(x => x.Name))}");
Microsoft.ML.StandardTrainers (2)
FactorizationMachine\FieldAwareFactorizationMachineUtils.cs (2)
109var active0 = activeIndices.Contains(0); 110var active1 = activeIndices.Contains(1);
Microsoft.ML.Sweeper (1)
Parameters.cs (1)
527if (paramValue.Contains(','))
Microsoft.ML.TimeSeries (2)
SrCnnEntireAnomalyDetector.cs (2)
911if (!anomalyIdxList.Contains(i)) 925if (!anomalyIdxList.Contains(i))
Microsoft.ML.TorchSharp (2)
Utils\DefaultDictionary.cs (1)
67return _dictionary.Contains(item);
Utils\FileUtils.cs (1)
48if (!_validTypes.Contains(typeof(T)))
Microsoft.ML.Transforms (1)
Text\WordEmbeddingsExtractor.cs (1)
716if (!firstValue.Contains(Single.NaN))
Microsoft.ML.Vision (1)
DnnRetrainTransform.cs (1)
330var cols = input.Schema.Where(c => inputColIndices.Contains(c.Index));
Microsoft.VisualStudio.LanguageServices (9)
EditAndContinue\EditAndContinueFeedbackDiagnosticFileProvider.cs (1)
151return JObject.Parse(content)["processIds"] is JContainer pidCollection && pidCollection.Values<int>().Contains(_vsProcessId);
Progression\GraphProvider.cs (7)
76if (context.Direction == GraphContextDirection.Self && context.RequestedProperties.Contains(DgmlNodeProperties.ContainsChildren)) 82(context.Direction == GraphContextDirection.Target && context.LinkCategories.Contains(CodeLinkCategories.Contains))) 87if (context.LinkCategories.Contains(CodeLinkCategories.InheritsFrom)) 99if (context.LinkCategories.Contains(CodeLinkCategories.SourceReferences)) 104if (context.LinkCategories.Contains(CodeLinkCategories.Calls)) 116if (context.LinkCategories.Contains(CodeLinkCategories.Implements)) 128if (context.LinkCategories.Contains(RoslynGraphCategories.Overrides))
ProjectSystem\VisualStudioWorkspaceImpl.AbstractRemoveDocumentUndoUnit.cs (1)
36GetDocumentIds(fromProject).Contains(DocumentId))
Microsoft.VisualStudio.LanguageServices.LiveShare (4)
Client\RemoteLanguageServiceWorkspace.cs (1)
479if (_openedDocs.Values.Contains(documentId) || IsDocumentOpen(documentId))
Client\RoslynLSPClientService.cs (3)
43if (collaborationSession.RemoteServiceNames.Contains(languageSpecificLspServerProviderName)) 47else if (collaborationSession.RemoteServiceNames.Contains(roslynLspServerProviderName)) 51else if (collaborationSession.RemoteServiceNames.Contains(anyLspServerProviderName))
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\LanguageServer\Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (1)
187if (diagnostic.CustomTags?.Contains(WellKnownDiagnosticTags.Unnecessary) == true)
MSBuildTaskHost (3)
ChangeWaves.cs (2)
141else if (_cachedWave == EnableAllFeatures || AllWaves.Contains(_cachedWave)) 173Debug.Assert(_runningTests || AllWaves.Contains(wave), $"Change wave version {wave} is invalid");
Immutable\ImmutableDictionary.cs (1)
64return _backing.Contains(item);
Mvc.RoutingWebSite (1)
RemoveControllerActionDescriptorProvider.cs (1)
33if (controllerToRemove.Actions == null || controllerToRemove.Actions.Contains(controllerActionDescriptor.ActionName))
PresentationFramework (1)
HashHelper.cs (1)
26internal static bool HasReliableHashCode(object item) => item is not null && !s_unreliableTypes.Contains(item.GetType());
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\FileExtensionsAttribute.cs (1)
50return ExtensionsParsed.Contains(Path.GetExtension(fileName).ToLowerInvariant());
System.Composition.Convention (2)
System\Composition\Convention\ImportConventionBuilder.cs (2)
191(typeInfo.IsGenericTypeDefinition && s_supportedImportManyTypes.Contains(typeInfo.AsType())) || 192(typeInfo.AsType().IsConstructedGenericType && s_supportedImportManyTypes.Contains(typeInfo.GetGenericTypeDefinition()));
System.Composition.Hosting (1)
System\Composition\Hosting\Providers\ImportMany\ImportManyExportDescriptorProvider.cs (1)
20contract.ContractType.IsConstructedGenericType && s_supportedContractTypes.Contains(contract.ContractType.GetGenericTypeDefinition())))
System.Drawing.Common.Tests (2)
System\Drawing\FontConverterTests.cs (1)
193return installedFonts.Families.Select(t => t.Name).Contains(string.Empty);
System\Drawing\Printing\PrinterSettingsTests.cs (1)
194Assert.True(validValues.Contains(printerSettings.LandscapeAngle), $"PrinterSettings.LandscapeAngle ({printerSettings.LandscapeAngle}) must be 0, 90, or 270 degrees.");
System.Linq.Expressions (2)
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (1)
88(_scope.MergedScopes == null || !_scope.MergedScopes.Contains(node)))
System\Linq\Expressions\Interpreter\TypeOperations.cs (1)
398}.Contains(Convert.GetTypeCode(from)));
System.Linq.Queryable (1)
System\Linq\EnumerableRewriter.cs (1)
129if (t.IsGenericType && t.GetGenericTypeDefinition().GetInterfaces().Contains(typeof(IGrouping<,>)))
System.Private.CoreLib.Generators (1)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (1)
462if (onLoadData.NamedTypesToBeProtected.Contains(symbol.ContainingSymbol))
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexCodeFixer.cs (1)
299else if (argument.Value.ConstantValue.Value is string str && str.Contains('\\'))
System.Windows.Forms (7)
System\Windows\Forms\Accessibility\AccessibleObject.cs (1)
2989if (args?.Length == 0 && s_propertiesWithArguments.Contains(name))
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (1)
41bool IList.Contains(object? value) => _items.Contains(value);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (1)
43bool IList.Contains(object? value) => _items.Contains(value);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
2184if (!tabAttribute.TabClasses.Contains(tabClasses[j]))
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (1)
299bool IList.Contains(object? value) { return InnerList.Contains(value); }
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.ToolStripPanelRowCollection.cs (1)
113bool IList.Contains(object? value) { return InnerList.Contains(value); }
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowControlCollection.cs (1)
176bool IList.Contains(object? value) { return InnerList.Contains(value); }
System.Windows.Forms.Design (4)
System\ComponentModel\Design\SelectionService.cs (1)
333return _selection is not null && _selection.Contains(component);
System\ComponentModel\Design\UndoEngine.UndoUnit.cs (2)
198if (_ignoreAddingList is not null && _ignoreAddingList.Contains(e.Component)) 243if (_ignoreAddedList is not null && _ignoreAddedList.Contains(e.Component))
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (1)
242return s_validKeys.Contains(keyCode);
System.Windows.Forms.Design.Tests (4)
EnsureDesignerTests.cs (1)
22Assert.True(forwardedTypes.Contains(designer.FullName), $"{designer.FullName} must be type forwarded");
EnsureEditorsTests.cs (2)
32&& !nonTypeForwardedEditors.Contains(t)); 35Assert.True(forwardedTypes.Contains(editor.FullName), $"{editor.FullName} must be type forwarded");
System\Windows\Forms\Design\ToolStripContentPanelDesignerTests.cs (1)
43bool containsPaddingSnapLines = snapLines.Any(snapLine => paddingFilters.Contains(snapLine.Filter));
System.Windows.Forms.Primitives (1)
System\Windows\Forms\NonNullCollection.cs (1)
71if (items is null || items.Contains(default))
System.Windows.Forms.Primitives.TestUtilities (1)
Metafiles\Validators\SkipTypesValidator.cs (1)
14public bool ShouldValidate(ENHANCED_METAFILE_RECORD_TYPE recordType) => _skipTypes.Contains(recordType);
System.Windows.Forms.Tests (2)
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (2)
1269if (!s_controlsIgnoringTextChangesForTests.Contains(type)) 1275string expectedValue = s_controlsNotUseTextForAccessibility.Contains(type) ? string.Empty : "Alt+n";
Templates.Blazor.Tests (1)
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
63var noHttps = args?.Contains(ArgConstants.NoHttps) ?? false;
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
63var noHttps = args?.Contains(ArgConstants.NoHttps) ?? false;
Templates.Blazor.WebAssembly.Tests (1)
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
63var noHttps = args?.Contains(ArgConstants.NoHttps) ?? false;
Templates.Mvc.Tests (15)
BlazorTemplateTest.cs (11)
59var expectedLaunchProfileNames = args.Contains(ArgConstants.NoHttps) 69if (!args.Contains(ArgConstants.IndividualAuth)) 78if (args.Contains(ArgConstants.UseLocalDb)) 108if (args.Contains(ArgConstants.IndividualAuth) && !args.Contains(ArgConstants.Empty)) 130if (args.Contains(ArgConstants.IndividualAuth)) 138if (args.Contains(ArgConstants.Empty)) 145if (args.Contains(ArgConstants.NoInteractivity)) 155if (!args.Contains(ArgConstants.IndividualAuth)) 161if (args.Contains(ArgConstants.Empty)) 168if (args.Contains(ArgConstants.NoInteractivity))
MvcTemplateTest.cs (1)
62var noHttps = args?.Contains(ArgConstants.NoHttps) ?? false;
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
63var noHttps = args?.Contains(ArgConstants.NoHttps) ?? false;
WebApiTemplateTest.cs (2)
198var noHttps = args.Contains(ArgConstants.NoHttps); 223var noHttps = args?.Contains(ArgConstants.NoHttps) ?? false;
Templates.Tests (4)
EmptyWebTemplateTest.cs (1)
82var noHttps = args?.Contains(ArgConstants.NoHttps) ?? false;
GrpcTemplateTest.cs (1)
71var nativeAot = args?.Contains(ArgConstants.PublishNativeAot) ?? false;
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
63var noHttps = args?.Contains(ArgConstants.NoHttps) ?? false;
WorkerTemplateTest.cs (1)
51var nativeAot = args?.Contains(ArgConstants.PublishNativeAot) ?? false;
TestingAppHost1.AppHost (4)
Program.cs (4)
17if (args.Contains("--crash-before-build")) 24if (args.Contains("--crash-after-build")) 31if (args.Contains("--crash-after-start")) 38if (args.Contains("--crash-after-shutdown"))
WinFormsControlsTest (1)
Calendar.cs (1)
22if (monthCalendar1.BoldedDates.Contains(e.Start))
xunit.assert (2)
EqualityAsserts.cs (2)
329 else if (expectedInterfaceTypeDefinitions != null && actualInterfaceTypeDefinitions != null && expectedInterfaceTypeDefinitions.Contains(typeofSet) && actualInterfaceTypeDefinitions.Contains(typeofSet))
xunit.console (2)
Program.cs (2)
16var internalDiagnosticsMessageSink = DiagnosticMessageSink.ForInternalDiagnostics(consoleLock, args.Contains("-internaldiagnostics"), args.Contains("-nocolor"));