5 implementations of AllInterfaces
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
CodeGenerationTypeSymbol.cs (1)
43public ImmutableArray<INamedTypeSymbol> AllInterfaces
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\TypeSymbol.cs (1)
102ImmutableArray<INamedTypeSymbol> ITypeSymbol.AllInterfaces
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
85public ImmutableArray<INamedTypeSymbol> AllInterfaces => _symbol.AllInterfaces;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeSymbol.vb (1)
534Private ReadOnly Property ITypeSymbol_AllInterfaces As ImmutableArray(Of INamedTypeSymbol) Implements ITypeSymbol.AllInterfaces
Microsoft.CodeAnalysis.Workspaces (1)
CodeGenerationTypeSymbol.cs (1)
43public ImmutableArray<INamedTypeSymbol> AllInterfaces
121 references to AllInterfaces
Microsoft.CodeAnalysis.CodeStyle (19)
AbstractForEachCastDiagnosticAnalyzer.cs (2)
126var isFixable = collectionType.Equals(ienumerableType) || collectionType.AllInterfaces.Any(static (i, ienumerableType) => i.Equals(ienumerableType), ienumerableType) && 143collectionType.AllInterfaces.Any(static (i, ienumerableOfTType) => i.OriginalDefinition.Equals(ienumerableOfTType), ienumerableOfTType);
AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
281containingType.AllInterfaces.Any((@interface, marshaler) => @interface.Equals(marshaler), _iCustomMarshaler))
AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
103if (objectType.Type == null || !objectType.Type.AllInterfaces.Contains(ienumerableType))
DeserializationConstructorCheck.cs (1)
30methodSymbol.ContainingType.AllInterfaces.Contains(_iSerializableType);
INamedTypeSymbolExtensions.cs (1)
399: baseType.AllInterfaces;
ISymbolExtensions.cs (3)
99var query = from iface in containingType.AllInterfaces 652var members = returnType.AllInterfaces.Concat(returnType.GetBaseTypesAndThis()) 692var members = returnType.AllInterfaces.Concat(returnType.GetBaseTypesAndThis())
ITypeSymbolExtensions.cs (8)
41var allInterfaces = type.AllInterfaces; 106symbols.AddRange(interfaceType.AllInterfaces.Select(i => i.OriginalDefinition)); 162return type.GetBaseTypesAndThis().Concat(type.AllInterfaces).Contains(t => SymbolEquivalenceComparer.Instance.Equals(t, baseType)); 186IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes(); 218return type.AllInterfaces.Any(static (t, originalInterfaceType) => SymbolEquivalenceComparer.Instance.Equals(t.OriginalDefinition, originalInterfaceType), originalInterfaceType); 224return type.AllInterfaces.Contains(t => SymbolEquivalenceComparer.Instance.Equals(t, interfaceType)); 404typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 717type?.AllInterfaces.Contains(iDisposableType) == true);
NamingStyleRules.cs (1)
96var implementedInterfaces = containingType.AllInterfaces;
SemanticModelExtensions.cs (1)
194return type.AllInterfaces.Any(static (i, enumerableType) => i.OriginalDefinition.Equals(enumerableType), enumerableType);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
ConvertProgramAnalysis_TopLevelStatements.cs (1)
97if (containingType.AllInterfaces.Length > 0)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (26)
CodeGen\CodeGenTupleTest.cs (26)
20366Assert.Equal(2, model.GetDeclaredSymbol(c1).AllInterfaces.Count()); 20367Assert.Equal("I0<(System.Int32 a, System.Int32 b)>", model.GetDeclaredSymbol(c1).AllInterfaces[0].ToTestDisplayString()); 20368Assert.Equal("I0<(System.Int32 notA, System.Int32 notB)>", model.GetDeclaredSymbol(c1).AllInterfaces[1].ToTestDisplayString()); 20371Assert.Equal(1, model.GetDeclaredSymbol(c2).AllInterfaces.Count()); 20372Assert.Equal("I0<(System.Int32 a, System.Int32 b)>", model.GetDeclaredSymbol(c2).AllInterfaces[0].ToTestDisplayString()); 20375Assert.Equal(1, model.GetDeclaredSymbol(c3).AllInterfaces.Count()); 20376Assert.Equal("I0<System.Int32>", model.GetDeclaredSymbol(c3).AllInterfaces[0].ToTestDisplayString()); 20458var c1AllInterfaces = c1.AllInterfaces; 20470var c2AllInterfaces = c2.AllInterfaces; 20482var c3AllInterfaces = c3.AllInterfaces; 20493var c4AllInterfaces = c4.AllInterfaces; 20672var c1AllInterfaces = c1.AllInterfaces; 20684var c2AllInterfaces = c2.AllInterfaces; 20696var c3AllInterfaces = c3.AllInterfaces; 20707var c4AllInterfaces = c4.AllInterfaces; 20754var c3AllInterfaces = c3.AllInterfaces; 24305derivedSymbol.AllInterfaces.Select(i => i.ToTestDisplayString())); 24368derivedSymbol.AllInterfaces.Select(i => i.ToTestDisplayString())); 24432derivedSymbol.AllInterfaces.Select(i => i.ToTestDisplayString())); 24442collectionSymbol.AllInterfaces.Select(i => i.ToTestDisplayString())); 24505derivedSymbol.AllInterfaces.Select(i => i.ToTestDisplayString())); 24515collectionSymbol.AllInterfaces.Select(i => i.ToTestDisplayString())); 24578derivedSymbol.AllInterfaces.Select(i => i.ToTestDisplayString())); 24587collectionSymbol.AllInterfaces.Select(i => i.ToTestDisplayString())); 24652derivedSymbol.AllInterfaces.Select(i => i.ToTestDisplayString())); 24662collectionSymbol.AllInterfaces.Select(i => i.ToTestDisplayString()));
Microsoft.CodeAnalysis.CSharp.Features (6)
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
144collectionType ??= namedType.AllInterfaces.FirstOrDefault(
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (1)
116interfaceSet.AddRange(directInterface.AllInterfaces);
ConvertProgramAnalysis_TopLevelStatements.cs (1)
97if (containingType.AllInterfaces.Length > 0)
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (1)
86var implementedMembersFromAllInterfaces = GetImplementedMembers(containingType, containingType.AllInterfaces);
ImplementInterface\CSharpImplementImplicitlyCodeRefactoringProvider.cs (1)
42var containingTypeInterfaces = member.ContainingType.AllInterfaces;
Snippets\CSharpForEachLoopSnippetProvider.cs (1)
43symbol.GetSymbolType()!.AllInterfaces.Any(
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (1)
NavigationCommandHandlers\FindImplementingMembersCommandHandler.cs (1)
118foreach (var iFace in interfaceSymbol.AllInterfaces)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
PullMemberUp\TestPullMemberUpService.cs (1)
38var allInterfaces = containingType.AllInterfaces;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
SymbolFinder\DependentTypeFinderTests.cs (2)
502Assert.True(transitiveDerived.All(d => d.AllInterfaces.Contains(rootType)), "All results must transitively derive from the type"); 554Assert.True(transitiveImpls.All(d => d.AllInterfaces.Contains(rootType)), "All results must transitively derive from the type");
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
97If namedType.AllInterfaces.Contains(context.Compilation.GetTypeByMetadataName("System.Runtime.Serialization.ISerializable")) Then
Microsoft.CodeAnalysis.Features (13)
AbstractForEachCastDiagnosticAnalyzer.cs (2)
126var isFixable = collectionType.Equals(ienumerableType) || collectionType.AllInterfaces.Any(static (i, ienumerableType) => i.Equals(ienumerableType), ienumerableType) && 143collectionType.AllInterfaces.Any(static (i, ienumerableOfTType) => i.OriginalDefinition.Equals(ienumerableOfTType), ienumerableOfTType);
AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
281containingType.AllInterfaces.Any((@interface, marshaler) => @interface.Equals(marshaler), _iCustomMarshaler))
AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
103if (objectType.Type == null || !objectType.Type.AllInterfaces.Contains(ienumerableType))
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
293foreach (var current in collectionType.AllInterfaces)
DeserializationConstructorCheck.cs (1)
30methodSymbol.ContainingType.AllInterfaces.Contains(_iSerializableType);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
2339TypesEquivalent(oldType.AllInterfaces, newType.AllInterfaces, exact);
EmbeddedLanguages\EmbeddedLanguageDetector.cs (1)
155var iformattable = type.AllInterfaces.FirstOrDefault(t => t is
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
150return !containingType.AllInterfaces.Contains(constructedType);
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
85public ImmutableArray<INamedTypeSymbol> AllInterfaces => _symbol.AllInterfaces;
PullMemberUp\AbstractPullMemberUpRefactoringProvider.cs (1)
107: containingType.AllInterfaces.Concat(containingType.GetBaseTypes()).ToImmutableArray();
SignatureHelp\CommonSignatureHelpUtilities.cs (1)
165if (!parentType.AllInterfaces.Contains(ienumerableType))
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeSymbol.vb (1)
534Private ReadOnly Property ITypeSymbol_AllInterfaces As ImmutableArray(Of INamedTypeSymbol) Implements ITypeSymbol.AllInterfaces
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (24)
CodeGen\CodeGenTuples.vb (24)
17099Assert.Equal(2, c1.AllInterfaces.Count) 17100Assert.Equal("I0(Of (a As System.Int32, b As System.Int32))", c1.AllInterfaces(0).ToTestDisplayString()) 17101Assert.Equal("I0(Of (notA As System.Int32, notB As System.Int32))", c1.AllInterfaces(1).ToTestDisplayString()) 17105Assert.Equal(1, c2.AllInterfaces.Count) 17106Assert.Equal("I0(Of (a As System.Int32, b As System.Int32))", c2.AllInterfaces(0).ToTestDisplayString()) 17110Assert.Equal(1, c3.AllInterfaces.Count) 17111Assert.Equal("I0(Of System.Int32)", c3.AllInterfaces(0).ToTestDisplayString()) 17201Dim c1AllInterfaces = c1.AllInterfaces 17213Dim c2AllInterfaces = c2.AllInterfaces 17225Dim c3AllInterfaces = c3.AllInterfaces 17236Dim c4AllInterfaces = c4.AllInterfaces 17301Dim c1AllInterfaces = c1.AllInterfaces 17309Dim c2AllInterfaces = c2.AllInterfaces 17374Dim c1AllInterfaces = c1.AllInterfaces 17382Dim c2AllInterfaces = c2.AllInterfaces 17484Dim c1AllInterfaces = c1.AllInterfaces 17496Dim c2AllInterfaces = c2.AllInterfaces 17508Dim c3AllInterfaces = c3.AllInterfaces 17519Dim c4AllInterfaces = c4.AllInterfaces 17571Dim c3AllInterfaces = c3.AllInterfaces 17623Dim c3AllInterfaces = c3.AllInterfaces 20864derivedSymbol.AllInterfaces.Select(Function(i) i.ToTestDisplayString())) 20899derivedSymbol.AllInterfaces.Select(Function(i) i.ToTestDisplayString())) 20999derivedSymbol.AllInterfaces.Select(Function(i) i.ToTestDisplayString()))
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Completion\CompletionProviders\ImplementsClauseCompletionProvider.vb (1)
187Return ImmutableArray.CreateRange(Of ISymbol)([interface].AllInterfaces.SelectMany(Function(i) i.GetMembers()).Where(Function(s) s.IsAccessibleWithin(within))) _
Microsoft.CodeAnalysis.Workspaces (19)
FindSymbols\FindReferences\BaseTypeFinder.cs (1)
16=> FindBaseTypes(type).AddRange(type.AllInterfaces);
FindSymbols\SymbolFinder_Hierarchy.cs (1)
143foreach (var interfaceType in type.AllInterfaces)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs\INamedTypeSymbolExtensions.cs (1)
399: baseType.AllInterfaces;
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs\ISymbolExtensions.cs (3)
99var query = from iface in containingType.AllInterfaces 652var members = returnType.AllInterfaces.Concat(returnType.GetBaseTypesAndThis()) 692var members = returnType.AllInterfaces.Concat(returnType.GetBaseTypesAndThis())
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs\ITypeSymbolExtensions.cs (8)
41var allInterfaces = type.AllInterfaces; 106symbols.AddRange(interfaceType.AllInterfaces.Select(i => i.OriginalDefinition)); 162return type.GetBaseTypesAndThis().Concat(type.AllInterfaces).Contains(t => SymbolEquivalenceComparer.Instance.Equals(t, baseType)); 186IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes(); 218return type.AllInterfaces.Any(static (t, originalInterfaceType) => SymbolEquivalenceComparer.Instance.Equals(t.OriginalDefinition, originalInterfaceType), originalInterfaceType); 224return type.AllInterfaces.Contains(t => SymbolEquivalenceComparer.Instance.Equals(t, interfaceType)); 404typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 717type?.AllInterfaces.Contains(iDisposableType) == true);
NamingStyleRules.cs (1)
96var implementedInterfaces = containingType.AllInterfaces;
Recommendations\AbstractRecommendationServiceRunner.cs (1)
413foreach (var interfaceType in originalContainerType.AllInterfaces)
SemanticModelExtensions.cs (1)
194return type.AllInterfaces.Any(static (i, enumerableType) => i.OriginalDefinition.Equals(enumerableType), enumerableType);
Shared\Extensions\ITypeSymbolExtensions.cs (1)
90var constructedInterfaces = typeSymbol.AllInterfaces.Where(i =>
Shared\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
387return memberType.AllInterfaces.Contains(constructed, equalityComparer: SymbolEqualityComparer.Default);
Microsoft.VisualStudio.LanguageServices (3)
Progression\GraphQueries\ImplementsGraphQuery.cs (1)
32var implementedSymbols = ImmutableArray<ISymbol>.CastUp(namedType.AllInterfaces);
Progression\GraphQueries\InheritsGraphQuery.cs (2)
46else if (namedType.TypeKind == TypeKind.Interface && !namedType.OriginalDefinition.AllInterfaces.IsEmpty) 48foreach (var baseNode in namedType.OriginalDefinition.AllInterfaces.Distinct())
Microsoft.VisualStudio.LanguageServices.Implementation (3)
CodeModel\ExternalElements\AbstractExternalCodeType.cs (1)
65builder.AddRange(typeSymbol.AllInterfaces);
CodeModel\ExternalElements\ExternalCodeClass.cs (1)
64get { return ExternalTypeCollection.Create(this.State, this, this.ProjectId, TypeSymbol.AllInterfaces); }
CodeModel\ExternalElements\ExternalCodeStruct.cs (1)
51get { return ExternalTypeCollection.Create(this.State, this, this.ProjectId, TypeSymbol.AllInterfaces); }