Implemented interface members:
method
Contains
System.Collections.Immutable.IImmutableSet<T>.Contains(T)
152 references to Contains
AnalyzerRunner (3)
CodeRefactoringRunner.cs (2)
81if (!syntaxKinds.Contains(node.RawKind)) 192else if (options.AnalyzerNames.Contains(refactoring.GetType().Name))
DiagnosticAnalyzerRunner.cs (1)
278else if (options.AnalyzerNames.Contains(analyzer.GetType().Name))
BuildActionTelemetryTable (2)
Program.cs (2)
523if (IgnoredCodeActions.Contains(actionTypeName)) 591if (IgnoredCodeActions.Contains(actionOrProviderTypeName))
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
60return TriggerCharacters.Contains(trigger.Character);
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
54return TriggerCharacters.Contains(trigger.Character);
Microsoft.Build.Engine.UnitTests (1)
EvaluationProfiler_Tests.cs (1)
259Assert.True(profiledElements.All(e => e.ParentId == null || allUniqueIds.Contains(e.ParentId.Value)));
Microsoft.Build.Tasks.Core (1)
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigCache.cs (1)
69return _useOriginalFileExists ? _fileExists(path) : _filesInDirectories.Contains(path);
Microsoft.CodeAnalysis (23)
Collections\ImmutableHashSetExtensions.cs (1)
34if (!set.Contains(item))
CommandLine\AnalyzerConfig.cs (2)
246if (ReservedKeys.Contains(key) || ReservedValues.Contains(value))
DiagnosticAnalyzer\AnalysisResult.cs (2)
121if (excludedAnalyzers.Contains(diagnosticsByAnalyzer.Key)) 138if (excludedAnalyzers.Contains(diagnosticsByAnalyzer.Key))
DiagnosticAnalyzer\AnalysisResultBuilder.cs (2)
542if (analyzers.Contains(diagnosticsByAnalyzer.Key)) 572if (analyzers.Contains(diagnosticsByAnalyzer.Key))
DiagnosticAnalyzer\AnalysisScope.cs (2)
185Debug.Assert(_lazyAnalyzersSet.Value.Contains(analyzer)); 189return _lazyAnalyzersSet.Value.Contains(analyzer);
DiagnosticAnalyzer\AnalyzerDriver.cs (11)
908bool isAnalyzerEverSuppressed = !UnsuppressedAnalyzers.Contains(analyzer) || 909analyzersSuppressedForSomeTree.Contains(analyzer); 1276if (generatedCodeSymbolsInTree.Contains(symbol)) 1362return suppressedAnalyzers.Contains(analyzer); 1375if (NonConfigurableAndCustomConfigurableAnalyzers.Contains(analyzer)) 1381if ((SymbolStartAnalyzers.Contains(analyzer) || CompilationEndAnalyzers.Contains(analyzer)) && 2119if (!SymbolStartAnalyzers.Contains(analyzer)) 2145Debug.Assert(SymbolStartAnalyzers.Contains(analyzer)); 2209if (!driver.UnsuppressedAnalyzers.Contains(analyzer)) 2439var analyzers = Analyzers.WhereAsArray(UnsuppressedAnalyzers.Contains);
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (1)
377analyzers = analyzers.AddRange(suppressors.Where(suppressor => !suppressorsInAnalysisScope.Contains(suppressor)));
InternalUtilities\MultiDictionary.cs (1)
178return set.Contains(v);
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (1)
141/// <inheritdoc cref="ImmutableHashSet{T}.Contains(T)"/>
Microsoft.CodeAnalysis.CodeStyle (8)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
427if (!idsToAnalyze.Contains(descriptor.Id))
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
888=> methodSymbol.GetAttributes().Any(static (a, self) => self._attributeSetForMethodsToIgnore.Contains(a.AttributeClass), this);
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
241if (method.GetAttributes().Any(static (a, self) => a.AttributeClass is { } attributeClass && self._attributeSetForMethodsToIgnore.Contains(attributeClass), this))
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (1)
178return set.Contains(v);
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (1)
141/// <inheritdoc cref="ImmutableHashSet{T}.Contains(T)"/>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigParser.cs (2)
96if (ReservedKeys.Contains(key) || ReservedValues.Contains(value))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (1)
183if (!_analysisData.CapturedLocals.Contains(local))
Microsoft.CodeAnalysis.Collections.Package (1)
ImmutableSegmentedHashSet`1.cs (1)
141/// <inheritdoc cref="ImmutableHashSet{T}.Contains(T)"/>
Microsoft.CodeAnalysis.CSharp (27)
Binder\Binder.ValueChecks.cs (2)
1030if (this.LockedOrDisposedVariables.Contains(localSymbol)) 1160if (this.LockedOrDisposedVariables.Contains(parameterSymbol))
Binder\Binder_Patterns.cs (2)
131if (!decisionDag.ReachableLabels.Contains(whenTrueLabel)) 135else if (!decisionDag.ReachableLabels.Contains(whenFalseLabel))
Binder\SwitchBinder_Patterns.cs (1)
80return !reachableLabels.Contains(switchLabel.Label);
Binder\SwitchExpressionBinder.cs (2)
69if (!hasErrors && !reachableLabels.Contains(arm.Label)) 75if (!reachableLabels.Contains(defaultLabel))
Compilation\CSharpCompilation.cs (1)
3149if (!trackingSet.Contains(otherTree))
Compilation\CSharpDiagnosticFilter.cs (1)
157bool isNullableFlowAnalysisWarning = ErrorFacts.NullableWarnings.Contains(id);
FlowAnalysis\AbstractFlowPass.cs (2)
962if (!reachableLabels.Contains(node.WhenTrueLabel)) 967else if (!reachableLabels.Contains(node.WhenFalseLabel))
FlowAnalysis\AbstractFlowPass_Switch.cs (3)
51if (reachableLabels.Contains(label.Label) || label.HasErrors || 74if (node.ReachabilityDecisionDag.ReachableLabels.Contains(node.BreakLabel) || 166if (!reachableLabels.Contains(arm.Label) || arm.Pattern.HasErrors)
FlowAnalysis\NullableWalker.cs (5)
1361if (inputParamNames.Contains(inputParam.Name) 4909if ((leftType.IsNotNull && methodOpt.ReturnNotNullIfParameterNotNull.Contains(methodOpt.Parameters[0].Name)) || 4910(rightType.IsNotNull && methodOpt.ReturnNotNullIfParameterNotNull.Contains(methodOpt.Parameters[1].Name))) 6968if (returnNotNullIfParameterNotNull?.Contains(parameter.Name) == true) 9479var returnNotNull = operandState.IsNotNull() && method.ReturnNotNullIfParameterNotNull.Contains(parameter.Name);
Lowering\ClosureConversion\ClosureConversion.cs (1)
204return _allCapturedVariables.Contains(localOrParameter);
Symbols\Source\ConstantEvaluationHelpers.cs (3)
307if (node.Dependencies.Contains(stopAt)) 347Debug.Assert(n.DependedOnBy.Contains(field)); 355Debug.Assert(n.Dependencies.Contains(field));
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
1332if (notNullIfParameterNotNull.Contains(overrideParam.Name) && NullableWalker.GetParameterState(baseParam.TypeWithAnnotations, baseParam.FlowAnalysisAnnotations).IsNotNull)
Symbols\TypeSymbol.cs (1)
2427if (!overriddenMembers.Contains(baseAbstractMember))
Utilities\ValueSetFactory.EnumeratedValueSet.cs (2)
82return _included == _membersIncludedOrExcluded.Contains(value); 102return _membersIncludedOrExcluded.Contains(value);
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (2)
390if (BannedTypes.Contains(member?.ContainingType.Name)) 395if (BannedTypes.Contains(type?.Name))
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
1052if (BannedTypes.Contains(type.Name))
Microsoft.CodeAnalysis.CSharp.Features (6)
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
306if (!currentParameterNames.Contains(overloadParameter.Name) &&
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
136if (context.Trigger.Kind == CompletionTriggerKind.Insertion && s_triggerCharacters.Contains(context.Trigger.Character))
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (1)
228=> s_predefinedTypeMetadataNames.Contains(identifier);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (2)
390if (BannedTypes.Contains(member?.ContainingType.Name)) 395if (BannedTypes.Contains(type?.Name))
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
1052if (BannedTypes.Contains(type.Name))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
511if (ErrorFacts.NullableWarnings.Contains(MessageProvider.Instance.GetIdForErrorCode((int)error)))
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Rename\CSharpRenameRewriterLanguageService.cs (1)
197_conflictLocations.Contains(node.Span) &&
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeActions\CodeChangeProviderMetadataTests.cs (1)
103&& !predefinedNames.Contains(name))
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
VisualBasic\Scanner.cs (1)
99if (Keywords.Contains(text))
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
VisualBasicParsingTests.cs (1)
56Assert.True(MemberSignatureParser.Keywords.Contains(keyword));
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
VS\IFSharpWorkspaceProjectContextFactory.cs (1)
146=> _metadataReferences.Contains(referencePath);
Microsoft.CodeAnalysis.Features (2)
Completion\CompletionService.ProviderManager.cs (1)
236if (!y.Contains(v))
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
427if (!idsToAnalyze.Contains(descriptor.Id))
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Features\CodeFixes\CodeFixService.FixAllDiagnosticProvider.cs (2)
32if (diagnosticIds.Contains(IDEDiagnosticIds.RemoveUnnecessarySuppressionDiagnosticId)) 54bool shouldIncludeDiagnostic(string id) => _diagnosticIds == null || _diagnosticIds.Contains(id);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (1)
259if (failedDocuments == null || !failedDocuments.Contains(document))
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.HostStates.cs (2)
67if (referenceIdsToRedirectAsProjectAnalyzers.Contains(referenceId)) 142var stateSetMap = StateSetMap.Where(kvp => !excludedAnalyzers.Contains(kvp.Key)).ToImmutableDictionary();
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (3)
177Debug.Assert(!s_highPriorityComputeTasks.Contains(computeTask)); 199Debug.Assert(s_highPriorityComputeTasks.Contains(computeTask)); 277Debug.Assert(s_normalPriorityCancellationTokenSources.Contains(cancellationTokenSource));
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
1152if (_symbolNames.Contains(type.Name))
Microsoft.CodeAnalysis.VisualBasic (3)
Symbols\Source\SourceFieldSymbol.vb (3)
410Debug.Assert(n.DependedOnBy.Contains(field)) 417Debug.Assert(n.Dependencies.Contains(field)) 557If node.Dependencies.Contains(stopAt) Then
Microsoft.CodeAnalysis.VisualBasic.Features (4)
Completion\CompletionProviders\CompletionUtilities.vb (2)
49If CommonTriggerChars.Contains(ch) Then 61CommonTriggerChars.Contains(ch) OrElse
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.vb (2)
170Return _aliasedNames.Contains(identifier) 174Return s_predefinedTypeMetadataNames.Contains(identifier)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
Rename\VisualBasicRenameRewriterLanguageService.vb (2)
168_conflictLocations.Contains(node.Span) AndAlso 248If Me._conflictLocations.Contains(node.Span) Then
Microsoft.CodeAnalysis.Workspaces (33)
CodeFixes\FixAllOccurrences\FixAllContext.cs (1)
251return [.. diagnostics.Where(d => d != null && diagnosticIds.Contains(d.Id)
Diagnostics\DiagnosticAnalysisResult.cs (1)
253Debug.Assert(DocumentIds != null && DocumentIds.Contains(documentId));
FindSymbols\FindReferences\FindReferenceCache.cs (1)
104if (_aliasNameSet.Contains(token.ValueText))
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (1)
191Contract.ThrowIfFalse(group.Symbols.Contains(symbol), "Symbol group did not contain the very symbol we started with.");
FindSymbols\FindReferences\FindReferencesSearchEngine_FindReferencesInDocuments.cs (1)
65if (!projectsToSearch.Contains(currentProject))
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
486if (nonConflictSymbols.Contains(symbol))
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (1)
178return set.Contains(v);
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (1)
141/// <inheritdoc cref="ImmutableHashSet{T}.Contains(T)"/>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigParser.cs (2)
96if (ReservedKeys.Contains(key) || ReservedValues.Contains(value))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (1)
183if (!_analysisData.CapturedLocals.Contains(local))
Workspace\Solution\ProjectDependencyGraph.cs (7)
137Contract.ThrowIfFalse(ProjectIds.Contains(projectId)); 156.Where(r => ProjectIds.Contains(r.ProjectId)) 495Debug.Assert(referencesMap.Keys.All(projectIds.Contains)); 502Debug.Assert(projectIds.Contains(referencedProject), "Unexpected reference to unknown project."); 517Debug.Assert(reverseReferencesMap.Keys.All(projectIds.Contains)); 524Debug.Assert(reverseReferencesMap[referencedProject].Contains(project)); 534Debug.Assert(forwardReferencesMap[referencingProject].Contains(project));
Workspace\Solution\ProjectDependencyGraph_AddProjectReference.cs (3)
17Contract.ThrowIfFalse(ProjectIds.Contains(projectId)); 26.Where(r => ProjectIds.Contains(r.ProjectId)) 132if (projectIdToUpdate == projectId || existingTransitiveReferences?.Contains(projectId) == true)
Workspace\Solution\ProjectDependencyGraph_RemoveAllProjectReferences.cs (3)
15Contract.ThrowIfFalse(ProjectIds.Contains(projectId)); 86if (!references.Contains(projectId)) 113if (!references.Contains(projectId))
Workspace\Solution\ProjectDependencyGraph_RemoveProject.cs (3)
14Contract.ThrowIfFalse(ProjectIds.Contains(projectId)); 135if (references.Contains(removedProjectId)) 163if (references.Contains(removedProjectId))
Workspace\Solution\ProjectDependencyGraph_RemoveProjectReference.cs (6)
15Contract.ThrowIfFalse(ProjectIds.Contains(projectId)); 16Contract.ThrowIfFalse(_referencesMap[projectId].Contains(referencedProjectId)); 77if (!references.Contains(projectId)) 84Debug.Assert(references.Contains(referencedProjectId)); 105if (!references.Contains(referencedProjectId)) 138Debug.Assert(references.Contains(projectId));
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.cs (1)
209projectFilter.Contains(project.AbsolutePath))
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (1)
178return set.Contains(v);
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (1)
141/// <inheritdoc cref="ImmutableHashSet{T}.Contains(T)"/>
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
MEF\TestComposition.cs (1)
126=> Assemblies.Contains(typeof(Remote.BrokeredServiceBase).Assembly);
Microsoft.Interop.SourceGeneration (3)
MarshallingInfoParser.cs (2)
301if (inspectedElements.Contains(elementName)) 329if (paramName is not null && inspectedElements.Contains(paramName))
TypeSymbolExtensions.cs (1)
149if (seenTypes.Contains(type))
Microsoft.VisualStudio.LanguageServices (4)
PullMemberUp\SymbolDependentsBuilder.cs (2)
73_membersInType.Contains(memberReferenceOp.Member)) 82_membersInType.Contains(methodReferenceOp.TargetMethod))
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (1)
521.Where(d => latestDocumentDiagnostics.Contains(d) ||
TaskList\ExternalErrorDiagnosticUpdateSource.cs (1)
332=> GetOrCreateSupportedDiagnosticIds(projectId).Contains(id);
System.Collections.Immutable (1)
System\Collections\Immutable\ImmutableHashSet_1.cs (1)
842if (!otherAsSet.Contains(item))
System.Windows.Forms.Tests (4)
System\Windows\Forms\Design\DesignerAttributeTests.cs (4)
82if (SkipList.Contains(attribute.DesignerTypeName)) 100if (SkipList.Contains(attribute.SerializerTypeName)) 147if (SkipList.Contains(attribute.ConverterTypeName)) 164if (SkipList.Contains(attribute.EditorTypeName))