Implemented interface member:
281 references to Contains
BuildActionTelemetryTable (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
252=> descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.CompilationEnd);
Microsoft.Analyzers.Extra.Tests (2)
Resources\RoslynTestUtils.cs (2)
346if (fixer.FixableDiagnosticIds.Contains(d.Id)) 544return diags.Where(d => _fixer.FixableDiagnosticIds.Contains(d.Id));
Microsoft.Analyzers.Local.Tests (2)
Resources\RoslynTestUtils.cs (2)
347if (fixer.FixableDiagnosticIds.Contains(d.Id)) 545return diags.Where(d => _fixer.FixableDiagnosticIds.Contains(d.Id));
Microsoft.AspNetCore.App.Analyzers.Test (2)
RouteEmbeddedLanguage\RoutePatternBraceMatcherTests.cs (2)
200if (!spans.Contains(result.Value.LeftSpan) || !spans.Contains(result.Value.RightSpan))
Microsoft.CodeAnalysis (26)
Collections\ImmutableArrayExtensions.cs (6)
1314return other.Contains(array[0]); 1316return other.Contains(array[0]) && other.Contains(array[1]); 1318return other.Contains(array[0]) && other.Contains(array[1]) && other.Contains(array[2]);
Compilation\Compilation.cs (1)
3288emitOptions.InstrumentationKinds.Contains(InstrumentationKind.TestCoverage),
DiagnosticAnalyzer\AnalysisResult.cs (1)
72if (!Analyzers.Contains(analyzer))
DiagnosticAnalyzer\AnalysisResultBuilder.cs (1)
314if (analysisScope.AdditionalFiles.Contains(additionalText))
DiagnosticAnalyzer\AnalysisScope.cs (1)
203Debug.Assert(compilationWithAnalyzers.Analyzers.Contains(analyzer));
DiagnosticAnalyzer\AnalyzerExecutor.cs (2)
295Func<SuppressionDescriptor, bool> isSupportedSuppression = supportedSuppressions.Contains; 382if (kinds.Contains(symbol.Kind))
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (3)
156if (!_analyzers.Contains(analyzer)) 174if (analyzers.Any(static (a, self) => !self._analyzers.Contains(a), this)) 219if (!AdditionalFiles.Contains(file))
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (3)
1361if (!OperationBlocks.Contains(operationBlock)) 1494if (!OperationBlocks.Contains(operationBlock)) 1937if (!ReportedDiagnostics.Contains(suppression.SuppressedDiagnostic))
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
146if (diagnostic.CustomTags.Contains(WellKnownDiagnosticTags.Compiler))
Emit\EditAndContinue\SymbolMatcher.cs (1)
214Debug.Assert(isDeletedMemberMapping || newSynthesizedMembers.Contains(mappedMember));
InternalUtilities\OneOrMany.cs (1)
111=> HasOneItem ? EqualityComparer<T>.Default.Equals(item, _one) : _many.Contains(item);
Operations\ControlFlowGraphBuilder.cs (2)
6066Debug.Assert(validKinds.Contains(innerInitializer.Kind)); 6780if (_currentInterpolatedStringHandlerArgumentContext?.ApplicableCreationOperations.Contains(operation) == true)
Operations\ControlFlowGraphBuilder.InterpolatedStringContext.cs (1)
64Debug.Assert(_currentInterpolatedStringHandlerArgumentContext.ApplicableCreationOperations.Contains((IInterpolatedStringHandlerCreationOperation)operation));
SourceGeneration\GeneratorDriver.cs (1)
123if (generators.Contains(newGenerators[i]))
SourceGeneration\SyntaxStore.cs (1)
51Debug.Assert(_syntaxInputNodes.Contains(syntaxInputNode));
Microsoft.CodeAnalysis.CodeStyle (23)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
849if (_iNotifyCompletionType != null && memberSymbol.ContainingType.AllInterfaces.Contains(_iNotifyCompletionType) && memberSymbol.Name == "IsCompleted")
src\Analyzers\Core\Analyzers\UseAutoProperty\AccessedFields.cs (1)
33=> Equals(TrivialField, field) || NonTrivialFields.Contains(field);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
150if (objectType.Type == null || !objectType.Type.AllInterfaces.Contains(ienumerableType))
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (4)
153if (dataFlow.ReadInside.Contains(localOrParameter) || 154dataFlow.WrittenInside.Contains(localOrParameter)) 163return exprDataFlow.ReadInside.Contains(localOrParameter) || 164exprDataFlow.WrittenInside.Contains(localOrParameter);
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (6)
1314return other.Contains(array[0]); 1316return other.Contains(array[0]) && other.Contains(array[1]); 1318return other.Contains(array[0]) && other.Contains(array[1]) && other.Contains(array[2]);
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (1)
111=> HasOneItem ? EqualityComparer<T>.Default.Equals(item, _one) : _many.Contains(item);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
252=> descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.CompilationEnd);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
42if (type is INamedTypeSymbol namedType && namedType.TypeKind == TypeKind.Interface && !allInterfaces.Contains(namedType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolInfoExtensions.cs (1)
29if (info.CandidateSymbols.Contains(null!))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (6)
353if (_all.All(symbols.Contains) && symbols.All(_all.Contains)) 451if (s_allAccessibility.All(accessibilities.Contains) && accessibilities.All(s_allAccessibility.Contains)) 510if (_allModifierKind.All(modifiers.Contains) && modifiers.All(_allModifierKind.Contains))
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
101if (TooManyArgumentsDiagnosticIds.Contains(diagnostic.Id)) 106if (CannotConvertDiagnosticIds.Contains(diagnostic.Id))
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (1)
110if (!ContainingType.Interfaces.Contains(TypeToGenerateIn))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (1)
174=> this.SupportedLanguagesArray.Contains(languageName);
Microsoft.CodeAnalysis.CSharp (27)
Binder\Binder_Expressions.cs (1)
2262(currentType.IsInterface && (declaringType.IsObjectType() || currentType.AllInterfacesNoUseSiteDiagnostics.Contains(declaringType))))
Binder\Binder_Lookup.cs (1)
1218return baseType.IsInterface && GetBaseInterfaces(derivedType, basesBeingResolved, ref useSiteInfo).Contains(baseType);
Binder\LocalScopeBinder.cs (2)
510declaredInThisScope |= newSymbolKind == SymbolKind.Local && this.Locals.Contains((LocalSymbol)newSymbol); 511declaredInThisScope |= newSymbolKind == SymbolKind.Method && this.LocalFunctions.Contains((LocalFunctionSymbol)newSymbol);
Binder\PatternExplainer.cs (1)
47Debug.Assert(!nodes.Contains(x));
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
2676if (argsToParamsOpt.IsDefaultOrEmpty || !argsToParamsOpt.Contains(declaredParameterCount - 1))
BoundTree\Constructors.cs (1)
234if (!result.IsDefaultOrEmpty && result.Contains(RefKind.RefReadOnlyParameter))
CodeGen\EmitAddress.cs (1)
358if (topSequence.Locals.Contains(symbol))
Compilation\CSharpSemanticModel.cs (3)
3666Debug.Assert(boundObjectCreation.ConstructorsGroup.Contains(boundObjectCreation.Constructor)); 4044if ((object)constructorOpt == null ? !candidateConstructors.Any() : !candidateConstructors.Contains(constructorOpt)) 4059Debug.Assert(candidateConstructors.Contains(constructorOpt));
Compiler\MethodCompiler.cs (1)
354if (_emittingPdb || instrumentation.Kinds.Contains(InstrumentationKind.TestCoverage))
FlowAnalysis\NullableWalker.cs (1)
756if ((symbol.IsRequired() || membersWithStateEnforcedByRequiredMembers.Contains(symbol.Name)) && constructor.ShouldCheckRequiredMembers())
FlowAnalysis\NullableWalker.DebugVerifier.cs (2)
73else if (overrideSkippedExpression || !s_skippedExpressions.Contains(expression.Kind)) 164if (!s_skippedExpressions.Contains(child.Kind))
Lowering\AsyncRewriter\AsyncRewriter.cs (1)
145if (instrumentations.Kinds.Contains(InstrumentationKindExtensions.LocalStateTracing))
Lowering\IteratorRewriter\IteratorRewriter.cs (1)
180if (instrumentations.Kinds.Contains(InstrumentationKindExtensions.LocalStateTracing))
Lowering\LocalRewriter\LocalRewriter.cs (4)
113if (instrumentation.Kinds.Contains(InstrumentationKindExtensions.LocalStateTracing) && 120if (instrumentation.Kinds.Contains(InstrumentationKind.TestCoverage) && 127if (instrumentation.Kinds.Contains(InstrumentationKind.StackOverflowProbing) && 134if (instrumentation.Kinds.Contains(InstrumentationKind.ModuleCancellation) &&
Lowering\SyntheticBoundNodeFactory.cs (2)
862if (!result.IsDefaultOrEmpty && (result.Contains(RefKind.RefReadOnlyParameter) || 863(useStrictArgumentRefKinds && result.Contains(RefKind.In))))
Parser\DirectiveParser.cs (1)
884return this.Options.PreprocessorSymbols.Contains(id);
Symbols\Compilation_UsedAssemblies.cs (1)
193Debug.Assert(retargetingAssembly.Modules[0].ReferencedAssemblySymbols.Contains(underlyingDependency));
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
1903return (object)baseType == null || !baseType.AllInterfacesNoUseSiteDiagnostics.Contains(@interface);
Syntax\CSharpSyntaxTree.cs (1)
195return this.Options.PreprocessorSymbols.Contains(symbolName);
Microsoft.CodeAnalysis.CSharp.CodeStyle (11)
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (1)
46if (dataFlow.DataFlowsIn.Contains(symbol))
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (3)
207if (dataFlow.ReadOutside.Contains(outLocalSymbol) || dataFlow.WrittenOutside.Contains(outLocalSymbol)) 305return dataFlow.DataFlowsIn.Contains(outLocalSymbol);
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (2)
315if (analysis == null || analysis.ReadOutside.Contains(localSymbol) || analysis.WrittenOutside.Contains(localSymbol))
src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (2)
56if (UseExpressionBodyForAccessorsHelper.Instance.SyntaxKinds.Contains(nodeKind)) 77if (helper.SyntaxKinds.Contains(nodeKind))
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (2)
361return _semanticModel.AnalyzeDataFlow(statementOrExpression).DataFlowsIn.Contains(_localSymbol); 378return dataFlow.DataFlowsIn.Contains(_localSymbol);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
105if (!conditionalDirectives.Contains((DirectiveTriviaSyntax)closeBraceDirective.GetStructure()!))
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
LanguageServer\CSharpLspBuildOnlyDiagnosticsTests.cs (1)
29if (!supported.Contains(errorCode) && errorCode > 0)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
3715if (analyzersToQuery.Contains(analyzer))
Microsoft.CodeAnalysis.CSharp.Features (18)
ChangeSignature\ChangeSignatureFormattingRule.cs (2)
32if (s_allowableKinds.Contains(node.Kind())) 54if (previousToken.Kind() == SyntaxKind.CommaToken && s_allowableKinds.Contains(previousToken.Parent.Kind()))
ChangeSignature\CSharpChangeSignatureService.cs (3)
207if (matchKinds.Contains(current.Kind())) 241if (_updatableNodeKinds.Contains(node.Kind())) 247var matchingNode = node.AncestorsAndSelf().FirstOrDefault(n => _updatableAncestorKinds.Contains(n.Kind()));
Diagnostics\Analyzers\CSharpSimplifyTypeNamesDiagnosticAnalyzer.cs (1)
79=> node != null && s_kindsOfInterest.Contains(node.Kind());
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (1)
46if (dataFlow.DataFlowsIn.Contains(symbol))
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (3)
207if (dataFlow.ReadOutside.Contains(outLocalSymbol) || dataFlow.WrittenOutside.Contains(outLocalSymbol)) 305return dataFlow.DataFlowsIn.Contains(outLocalSymbol);
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (2)
315if (analysis == null || analysis.ReadOutside.Contains(localSymbol) || analysis.WrittenOutside.Contains(localSymbol))
src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (2)
56if (UseExpressionBodyForAccessorsHelper.Instance.SyntaxKinds.Contains(nodeKind)) 77if (helper.SyntaxKinds.Contains(nodeKind))
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (2)
361return _semanticModel.AnalyzeDataFlow(statementOrExpression).DataFlowsIn.Contains(_localSymbol); 378return dataFlow.DataFlowsIn.Contains(_localSymbol);
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (2)
154if (helper.SyntaxKinds.Contains(current.Kind())) 219if (!helper.IsRelevantDeclarationNode(node) || !helper.SyntaxKinds.Contains(node.Kind()))
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
159if (!supported.Contains(errorCode) && errorCode > 0)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Compilation\CompilationAPITests.cs (3)
805Assert.False(comp.SyntaxTrees.Contains(SyntaxFactory.ParseSyntaxTree(s1))); 838Assert.True(comp.SyntaxTrees.Contains(t1)); 1499Assert.False(comp.SyntaxTrees.Contains(null));
Compilation\UsedAssembliesTests.cs (2)
115var tryRemove = specificReferencesToAssert.Where(reference => reference.Properties.Kind == MetadataImageKind.Assembly && !used.Contains(reference)); 333var tryRemove = specificReferencesToAssert.Where(reference => reference.Properties.Kind == MetadataImageKind.Assembly && !used.Contains(reference));
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (2)
CodeGen\WinRTCollectionTests.cs (2)
7434Assert.True(model.LookupSymbols(add.SpanStart, jsonObjType, "Add").Contains(addMethod)); 7435Assert.True(model.LookupSymbols(add.SpanStart, jsonObjType).Contains(addMethod));
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (1)
706simpleTypeName = typeParameterNames?.Contains(text) == true ? null : text;
Rename\CSharpRenameRewriterLanguageService.cs (2)
238_possibleNameConflicts.Contains(token.ValueText) || 914if (renamedSymbol.ContainingType != null && renamedSymbol.ContainingType.GetMembers(renamedSymbol.Name).Contains(renamedSymbol))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
105if (!conditionalDirectives.Contains((DirectiveTriviaSyntax)closeBraceDirective.GetStructure()!))
Microsoft.CodeAnalysis.EditorFeatures (9)
IntelliSense\AsyncCompletion\CommitManager.cs (3)
360if (rule.Characters.Contains(ch)) 368if (rule.Characters.Contains(ch)) 376return rule.Characters.Contains(ch);
IntelliSense\AsyncCompletion\Helpers.cs (3)
130if (rule.Characters.Contains(ch)) 138if (rule.Characters.Contains(ch)) 146return rule.Characters.Contains(ch);
IntelliSense\AsyncCompletion\ItemManager.CompletionListUpdater.cs (1)
979if (!_unselectedExpanders.Contains(itemFilter))
Tagging\AbstractAsynchronousTaggerProvider.TagSource.cs (2)
335_dataSource.Options.Contains(option) || _dataSource.FeatureOptions.Contains(option)));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
Completion\TestFileSystemCompletionHelper.cs (1)
48=> _directories.Contains(fullPath.TrimEnd(PathUtilities.DirectorySeparatorChar));
SymbolFinder\DependentTypeFinderTests.cs (6)
494Assert.True(immediateDerived.All(d => d.Interfaces.Contains(rootType))); 502Assert.True(transitiveDerived.All(d => d.AllInterfaces.Contains(rootType)), "All results must transitively derive from the type"); 503Assert.True(transitiveDerived.Any(d => !d.Interfaces.Contains(rootType)), "At least one result must not immediately derive from the type"); 544Assert.True(immediateImpls.All(d => d.Interfaces.Contains(rootType))); 554Assert.True(transitiveImpls.All(d => d.AllInterfaces.Contains(rootType)), "All results must transitively derive from the type"); 555Assert.True(transitiveImpls.Any(d => !d.Interfaces.Contains(rootType)), "At least one result must not immediately derive from the type");
Workspaces\ClassificationTypeNamesTests.cs (1)
42=> Assert.True(ClassificationTypeNames.AllTypeNames.Contains(fieldName), $"Missing token type {fieldName}.");
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
BackgroundWorkIndicator\BackgroundWorkIndicatorContext.cs (1)
263Contract.ThrowIfFalse(_scopes.Contains(scope));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
95If namedType.AllInterfaces.Contains(context.Compilation.GetTypeByMetadataName("System.Runtime.Serialization.ISerializable")) Then
Microsoft.CodeAnalysis.Features (27)
ChangeSignature\SignatureChange.cs (2)
107var originalListWithoutRemovedOrAdded = originalListOfParameters.Where(updatedListOfParameters.Contains).ToImmutableArray(); 108var updatedListWithoutRemovedOrAdded = updatedListOfParameters.Where(originalListOfParameters.Contains).ToImmutableArray();
Common\AbstractProjectExtensionProvider.cs (1)
171if (languages.Contains(language))
Common\GlyphExtensions.cs (2)
47return allTags.Contains(LanguageNames.VisualBasic) ? Glyph.BasicFile : Glyph.CSharpFile; 50return allTags.Contains(LanguageNames.VisualBasic) ? Glyph.BasicProject : Glyph.CSharpProject;
Completion\CommonCompletionService.cs (2)
38=> item.Tags.Contains(WellKnownTags.Keyword); 41=> item.Tags.Contains(WellKnownTags.Snippet);
Completion\CompletionHelper.cs (1)
71=> item.Tags.Contains(WellKnownTags.Keyword);
Completion\CompletionItem.cs (1)
482if (Tags.Contains(tag))
Completion\Providers\SymbolCompletionItem.cs (1)
62if (symbols.All(symbol => symbol.IsObsolete()) && !tags.Contains(WellKnownTags.Deprecated))
Completion\SharedSyntaxContextsWithSpeculativeModel.cs (1)
35if (_document.Id != document.Id && !_lazyRelatedDocumentIds.Value.Contains(document.Id))
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
410return dataFlow.WrittenInside.Contains(foreachVariable);
EmbeddedLanguages\Classification\AbstractFallbackEmbeddedLanguageClassifier.cs (1)
34if (!_supportedKinds.Contains(token.RawKind))
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingWorkItem.cs (1)
47=> SpecificAnalyzers?.Count > 0 ? SpecificAnalyzers.Where(allAnalyzers.Contains) : allAnalyzers;
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
148return !containingType.AllInterfaces.Contains(constructedType);
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (1)
74Debug.Assert(priorityDocuments.All(d => projects.Contains(d.Project)));
NavigateTo\AbstractNavigateToSearchService.NormalSearch.cs (1)
82Debug.Assert(priorityDocuments.All(d => projects.Contains(d.Project)));
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
849if (_iNotifyCompletionType != null && memberSymbol.ContainingType.AllInterfaces.Contains(_iNotifyCompletionType) && memberSymbol.Name == "IsCompleted")
src\Analyzers\Core\Analyzers\UseAutoProperty\AccessedFields.cs (1)
33=> Equals(TrivialField, field) || NonTrivialFields.Contains(field);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
150if (objectType.Type == null || !objectType.Type.AllInterfaces.Contains(ienumerableType))
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (4)
153if (dataFlow.ReadInside.Contains(localOrParameter) || 154dataFlow.WrittenInside.Contains(localOrParameter)) 163return exprDataFlow.ReadInside.Contains(localOrParameter) || 164exprDataFlow.WrittenInside.Contains(localOrParameter);
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
101if (TooManyArgumentsDiagnosticIds.Contains(diagnostic.Id)) 106if (CannotConvertDiagnosticIds.Contains(diagnostic.Id))
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (1)
110if (!ContainingType.Interfaces.Contains(TypeToGenerateIn))
Microsoft.CodeAnalysis.LanguageServer.Protocol (11)
Features\Diagnostics\DocumentAnalysisExecutor.cs (6)
173var compilation = _compilationBasedProjectAnalyzersInAnalysisScope.Contains(analyzer) ? _compilationWithAnalyzers.ProjectCompilation : _compilationWithAnalyzers.HostCompilation; 216RoslynDebug.Assert(_compilationBasedProjectAnalyzersInAnalysisScope.Contains(analyzer) || _compilationBasedHostAnalyzersInAnalysisScope.Contains(analyzer)); 219var analysisScope = _compilationBasedProjectAnalyzersInAnalysisScope.Contains(analyzer) 240RoslynDebug.Assert(_compilationBasedProjectAnalyzersInAnalysisScope.Contains(analyzer) || _compilationBasedHostAnalyzersInAnalysisScope.Contains(analyzer));
Handler\CodeActions\CodeActionHelpers.cs (1)
98|| suggestedAction.OriginalCodeAction.Tags.Contains(CodeAction.RequiresNonDocumentChange);
Handler\SemanticTokens\SemanticTokensSchema.cs (2)
62.Where(classificationTypeName => !ClassificationTypeNames.AdditiveTypeNames.Contains(classificationTypeName)) 73.Where(classificationTypeName => !ClassificationTypeNames.AdditiveTypeNames.Contains(classificationTypeName))
Handler\SpellCheck\WorkspaceSpellCheckHandler.cs (1)
66if (!supportedLanguages.Contains(project.Language))
Workspaces\LspWorkspaceManager.cs (1)
587return _manager._lspWorkspaceRegistrationService.GetAllRegistrations().Contains(workspace);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
SemanticTokens\SemanticTokensRangeTests.cs (1)
586var expectedNames = ClassificationTypeNames.AllTypeNames.Where(s => !ClassificationTypeNames.AdditiveTypeNames.Contains(s));
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\ProcessTelemetry\RemoteProcessTelemetryService.cs (1)
96if (loggerTypes.Contains(typeof(T).Name))
Microsoft.CodeAnalysis.Scripting (2)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\ClrGlobalAssemblyCache.cs (1)
190if (!architectureFilter.Contains(assemblyArchitecture))
src\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs (1)
123!architectureFilter.Contains(gacAssemblyName.ProcessorArchitecture))
Microsoft.CodeAnalysis.Test.Utilities (7)
Compilation\ControlFlowGraphVerifier.cs (5)
780AssertTrueWithGraph(block.EnclosingRegion.CaptureIds.Contains(id), $"Flow capture initialization [{id}] should come from the containing region.", finalGraph); 796if (block.EnclosingRegion.CaptureIds.Contains(id) || longLivedIds.Contains(id)) 801if (block.EnclosingRegion.EnclosingRegion.CaptureIds.Contains(id)) 813else if (block.EnclosingRegion.EnclosingRegion?.EnclosingRegion.CaptureIds.Contains(id) ?? false) 1027if (region.CaptureIds.Contains(id))
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (1)
213if (derivedType.Interfaces.Contains(baseType))
TargetFrameworkUtil.cs (1)
352if (references.Contains(r))
Microsoft.CodeAnalysis.UnitTests (1)
Diagnostics\SuppressMessageTargetSymbolResolverTests.cs (1)
1403where candidate != null && candidate.Locations.Contains(location)
Microsoft.CodeAnalysis.VisualBasic (10)
BoundTree\BoundConvertedTupleElements.vb (2)
16Debug.Assert(Not ElementPlaceholders.Contains(Nothing)) 17Debug.Assert(Not ConvertedElements.Contains(Nothing))
Compilation\MethodCompiler.vb (1)
114If _emittingPdb OrElse instrumentations.Kinds.Contains(InstrumentationKind.TestCoverage) Then
Compilation\VisualBasicCompilation.vb (2)
1791Debug.Assert(AllSyntaxTrees.Contains(tree)) 2246If Not SyntaxTrees.Contains(tree) Then
Lowering\Rewriter.vb (1)
51If(Not isBodySynthesized AndAlso instrumentations.Kinds.Contains(InstrumentationKind.TestCoverage),
Symbols\Source\ImplementsHelper.vb (1)
43Debug.Assert(GetExplicitInterfaceImplementations(sourceSym).Contains(implementedSym))
Symbols\Source\SourceMethodSymbol.vb (1)
1152Debug.Assert(ExplicitInterfaceImplementations.Contains(implementedMethod))
Symbols\Source\SourceModuleSymbol.vb (1)
173ElseIf _assemblySymbol.DeclaringCompilation.AllSyntaxTrees.Contains(tree) Then
Symbols\Source\SourcePropertySymbol.vb (1)
1004Debug.Assert(ExplicitInterfaceImplementations.Contains(implementedProperty))
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
src\Analyzers\VisualBasic\Analyzers\UseAutoProperty\VisualBasicUseAutoPropertyAnalyzer.vb (1)
137If setMethod.Parameters.Contains(TryCast(symbol, IParameterSymbol)) Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Helpers\RemoveUnnecessaryImports\VisualBasicUnnecessaryImportsProvider.vb (1)
146If compilation.MemberImports.Contains(namespaceOrType) AndAlso
Microsoft.CodeAnalysis.VisualBasic.Features (8)
ChangeSignature\VisualBasicChangeSignatureService.vb (5)
161If _declarationKinds.Contains(current.Kind()) Then 165If _declarationAndInvocableKinds.Contains(current.Kind()) Then 231If _updatableNodeKinds.Contains(node.Kind()) Then 235Dim matchingNode = node.AncestorsAndSelf().FirstOrDefault(Function(a) _updatableAncestorKinds.Contains(a.Kind())) 263If _nodeKindsToIgnore.Contains(matchingNode.Kind()) Then
Completion\VisualBasicCompletionService.vb (1)
98If keywordCompletionItem IsNot Nothing AndAlso keywordCompletionItem.Tags.Contains(WellKnownTags.Intrinsic) Then
Diagnostics\Analyzers\VisualBasicSimplifyTypeNamesDiagnosticAnalyzer.vb (1)
67Return s_kindsOfInterest.Contains(node.Kind)
src\Analyzers\VisualBasic\Analyzers\UseAutoProperty\VisualBasicUseAutoPropertyAnalyzer.vb (1)
137If setMethod.Parameters.Contains(TryCast(symbol, IParameterSymbol)) Then
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Compilation\CompilationAPITests.vb (1)
1311Assert.False(comp.SyntaxTrees.Contains(Nothing))
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
UsedAssembliesTests.vb (2)
100Dim tryRemove = specificReferencesToAssert.Where(Function(reference) reference.Properties.Kind = MetadataImageKind.Assembly AndAlso Not used.Contains(reference)) 156Dim tryRemove = specificReferencesToAssert.Where(Function(reference) reference.Properties.Kind = MetadataImageKind.Assembly AndAlso Not used.Contains(reference))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
FindSymbols\VisualBasicDeclaredSymbolInfoFactoryService.vb (1)
591simpleTypeName = If(typeParameterNames?.Contains(text), Nothing, text)
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
784If renamedSymbol.ContainingType IsNot Nothing AndAlso renamedSymbol.ContainingType.GetMembers(renamedSymbol.Name).Contains(renamedSymbol) Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Helpers\RemoveUnnecessaryImports\VisualBasicUnnecessaryImportsProvider.vb (1)
146If compilation.MemberImports.Contains(namespaceOrType) AndAlso
Microsoft.CodeAnalysis.Workspaces (37)
CodeActions\CodeAction.cs (1)
99if (priority == CodeActionPriority.High && !this.CustomTags.Contains(CanBeHighPriorityTag))
CodeActions\CodeActionRequestPriority.cs (1)
69if (priority == CodeActionRequestPriority.High && !customTags.Contains(CodeAction.CanBeHighPriorityTag))
CodeFixes\FixAllOccurrences\FixAllProvider.cs (1)
87if (supportedFixAllScopes.Contains(FixAllScope.Custom))
CodeRefactorings\FixAllOccurences\FixAllProvider.cs (1)
87if (supportedFixAllScopes.Contains(FixAllScope.Custom))
Diagnostics\CompilationWithAnalyzersPair.cs (2)
59if (ProjectAnalyzers.Contains(analyzer)) 65Debug.Assert(HostAnalyzers.Contains(analyzer));
Diagnostics\Extensions.cs (1)
317diagnosticIdsToFilter.Contains(diagnostic.Id) ||
FindSymbols\FindReferences\Finders\PropertyAccessorSymbolReferenceFinder.cs (1)
87if (accessors.Contains(data.symbol))
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (1)
90if (containingTypeSyntaxes.Contains(constructorSyntax))
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (1)
141if (!projectsToSearch.Contains(currentProject))
ReassignedVariable\AbstractReassignedVariableService.cs (1)
381if (analysis.DefinitelyAssignedOnEntry.Contains(localOrParameter))
Recommendations\AbstractRecommendationService.cs (2)
129if (this.GetOuterTypesAndBases().Contains(containingTypeOriginalDefinition)) 131return this.GetEnclosingTypeBases().Contains(containingTypeOriginalDefinition);
Rename\Renamer.RenameDocumentActionSet.cs (1)
80if (actions.Any(static (a, self) => !self.ApplicableActions.Contains(a), this))
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (6)
1314return other.Contains(array[0]); 1316return other.Contains(array[0]) && other.Contains(array[1]); 1318return other.Contains(array[0]) && other.Contains(array[1]) && other.Contains(array[2]);
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (1)
111=> HasOneItem ? EqualityComparer<T>.Default.Equals(item, _one) : _many.Contains(item);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
252=> descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.CompilationEnd);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
42if (type is INamedTypeSymbol namedType && namedType.TypeKind == TypeKind.Interface && !allInterfaces.Contains(namedType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolInfoExtensions.cs (1)
29if (info.CandidateSymbols.Contains(null!))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (6)
353if (_all.All(symbols.Contains) && symbols.All(_all.Contains)) 451if (s_allAccessibility.All(accessibilities.Contains) && accessibilities.All(s_allAccessibility.Contains)) 510if (_allModifierKind.All(modifiers.Contains) && modifiers.All(_allModifierKind.Contains))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
48=> !diagnostic.Descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (1)
174=> this.SupportedLanguagesArray.Contains(languageName);
Workspace\Host\PersistentStorage\IPersistentStorageConfiguration.cs (1)
96val = new string(val.Where(c => !s_invalidPathChars.Contains(c)).ToArray());
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
1227return _allMetadataReferences.TryGetValue(fullPath, out var propertiesList) && propertiesList.Contains(properties);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (1)
767if (!projectReferenceInformation.OutputPaths.Contains(outputPath))
Workspace\Solution\Solution_SemanticModelCaching.cs (1)
32if (localArray.Contains((documentId, semanticModel)))
Workspace\Solution\SolutionCompilationState.cs (1)
254if (arg.changedProjectIds.Contains(id))
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (7)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (6)
1314return other.Contains(array[0]); 1316return other.Contains(array[0]) && other.Contains(array[1]); 1318return other.Contains(array[0]) && other.Contains(array[1]) && other.Contains(array[2]);
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (1)
111=> HasOneItem ? EqualityComparer<T>.Default.Equals(item, _one) : _many.Contains(item);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
VisualStudioMSBuildWorkspaceTests.cs (3)
192mr.Properties.Aliases.Contains(aliasName)); 1418Assert.DoesNotContain(metaRefs, r => r.Properties.Aliases.Contains("CSharpProject")); 1447Assert.DoesNotContain(vbProject.MetadataReferences, r => r.Properties.Aliases.Contains("CSharpProject"));
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\TryApplyChangesTests.cs (1)
44return _allowedKinds.Contains(feature);
Microsoft.Interop.ComInterfaceGenerator (1)
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (1)
73return SupportedComInterfaceTypes.Contains(interfaceType);
Microsoft.VisualStudio.LanguageServices (4)
CodeLens\CodeLensCallbackListener.cs (1)
68if (!projectGuids.Contains(projectGuid))
CommonControls\NewTypeDestinationSelectionViewModel.cs (1)
113if (_conflictingNames.Contains(trimmedName))
Diagnostics\VisualStudioVenusSpanMappingService.cs (1)
89if (documentIds.Contains(currentDocumentId))
Workspace\VisualStudioDocumentNavigationService.cs (1)
230var documentIdToNavigate = documentIdsForFilePath.Contains(documentId) ? documentId : documentIdsForFilePath.First();
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\LanguageServer\Handler\Completion\CompletionHandler.cs (1)
142var commitCharacters = xamlCommitCharacters.Characters.Select(c => new VSInternalCommitCharacter { Character = c.ToString(), Insert = !xamlCommitCharacters.NonInsertCharacters.Contains(c) }).ToImmutableArray();
Roslyn.VisualStudio.DiagnosticsWindow (1)
OptionPages\PerformanceLoggersPage.cs (1)
98if (loggerTypeNames.Contains(typeof(T).Name))
System.Collections.Immutable (1)
System\Collections\Immutable\ImmutableArray_1.cs (1)
1230return self.Contains((T)value!);