5 implementations of Interfaces
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (1)
40public virtual ImmutableArray<INamedTypeSymbol> Interfaces
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\TypeSymbol.cs (1)
94ImmutableArray<INamedTypeSymbol> ITypeSymbol.Interfaces
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
84public ImmutableArray<INamedTypeSymbol> Interfaces => _symbol.Interfaces;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeSymbol.vb (1)
557Private ReadOnly Property ITypeSymbol_Interfaces As ImmutableArray(Of INamedTypeSymbol) Implements ITypeSymbol.Interfaces
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (1)
40public virtual ImmutableArray<INamedTypeSymbol> Interfaces
112 references to Interfaces
ILLink.RoslynAnalyzer (7)
DataFlow\DynamicallyAccessedMembersBinder.cs (3)
345 foreach (var i in type.Interfaces) { 387 if (!type.Interfaces.IsEmpty) { 392 foreach (var iface in type.Interfaces) {
DynamicallyAccessedMembersAnalyzer.cs (1)
128 foreach (var interfaceType in type.Interfaces)
INamedTypeSymbolExtensions.cs (2)
35 var interfaces = namedType.Interfaces; 51 foreach (var iface in interfaceSymbol.Interfaces) {
ITypeSymbolExtensions.cs (1)
43 foreach (var iface in baseType.Interfaces) {
Microsoft.AspNetCore.Components.Analyzers (1)
InternalUsageAnalyzer.cs (1)
86foreach (var @interface in type.Interfaces)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
InternalUsageAnalyzer.cs (1)
86foreach (var @interface in type.Interfaces)
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
105foreach (var interfaceType in type.Interfaces)
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\Analyzers\Core\CodeFixes\AddExplicitCast\InheritanceDistanceComparer.cs (2)
68if (derivedType.Interfaces.Length != 0) 70foreach (var interfaceType in derivedType.Interfaces)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (1)
110if (!ContainingType.Interfaces.Contains(TypeToGenerateIn))
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
219if (!ContainingType.Interfaces.OfType<INamedTypeSymbol>().Contains(TypeToGenerateIn))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
29namedType.Interfaces,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
71return containingType.Interfaces.FirstOrDefault(iface => iface.Equals(equatable));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
322foreach (var type in namedType.Interfaces)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (13)
CodeGen\CodeGenTupleTest.cs (13)
14304m3TupleArray.Interfaces[0].ToTestDisplayString()); 14314m3TupleArray.Interfaces[0].ToTestDisplayString()); 14322m4TupleList.Interfaces[0].ToTestDisplayString()); 14468Assert.True(v2Type.Interfaces.IsEmpty); 20451var c1Interfaces = c1.Interfaces; 20463var c2Interfaces = c2.Interfaces; 20475var c3Interfaces = c3.Interfaces; 20486var c4Interfaces = c4.Interfaces; 20667var c1Interfaces = c1.Interfaces; 20679var c2Interfaces = c2.Interfaces; 20691var c3Interfaces = c3.Interfaces; 20702var c4Interfaces = c4.Interfaces; 20751var c3Interfaces = c3.Interfaces;
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
71return containingType.Interfaces.FirstOrDefault(iface => iface.Equals(equatable));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\NativeIntegerTests.cs (2)
260VerifyInterfaces(underlyingType, underlyingType.Interfaces, nativeIntegerType, nativeIntegerType.Interfaces);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\SemanticModelGetSemanticInfoTests.cs (1)
9284Assert.Empty(type.Interfaces);
Symbols\AnonymousTypesSemanticsTests.cs (1)
1992Assert.Equal(0, type.Interfaces.Length);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
322foreach (var type in namedType.Interfaces)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
SymbolFinder\DependentTypeFinderTests.cs (8)
123Assert.NotEqual(baseClassSymbol, derivedClassSymbol.Interfaces[0]); 340Assert.NotEqual(baseInterfaceSymbol, Assert.Single(implementingClassSymbol.Interfaces)); 381Assert.NotEqual(baseInterfaceSymbol, Assert.Single(implementingClassSymbol.Interfaces)); 421Assert.NotEqual(baseInterfaceSymbol, Assert.Single(implementingClassSymbol.Interfaces)); 494Assert.True(immediateDerived.All(d => d.Interfaces.Contains(rootType))); 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))); 555Assert.True(transitiveImpls.Any(d => !d.Interfaces.Contains(rootType)), "At least one result must not immediately derive from the type");
Microsoft.CodeAnalysis.Features (6)
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (1)
72foreach (var iface in containingType.Interfaces)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
84public ImmutableArray<INamedTypeSymbol> Interfaces => _symbol.Interfaces;
src\Analyzers\Core\CodeFixes\AddExplicitCast\InheritanceDistanceComparer.cs (2)
68if (derivedType.Interfaces.Length != 0) 70foreach (var interfaceType in derivedType.Interfaces)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (1)
110if (!ContainingType.Interfaces.Contains(TypeToGenerateIn))
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
219if (!ContainingType.Interfaces.OfType<INamedTypeSymbol>().Contains(TypeToGenerateIn))
Microsoft.CodeAnalysis.Test.Utilities (2)
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (2)
213if (derivedType.Interfaces.Contains(baseType)) 218foreach (INamedTypeSymbol baseInterface in derivedType.Interfaces)
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeSymbol.vb (1)
557Private ReadOnly Property ITypeSymbol_Interfaces As ImmutableArray(Of INamedTypeSymbol) Implements ITypeSymbol.Interfaces
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (2)
216If namedType.Interfaces.Length = 0 Then 220Dim types = namedType.Interfaces.Select(Function(t) t.GenerateTypeSyntax())
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (26)
CodeGen\CodeGenTuples.vb (26)
17199Dim c1Interfaces = c1.Interfaces 17211Dim c2Interfaces = c2.Interfaces 17223Dim c3Interfaces = c3.Interfaces 17234Dim c4Interfaces = c4.Interfaces 17299Dim c1Interfaces = c1.Interfaces 17307Dim c2Interfaces = c2.Interfaces 17372Dim c1Interfaces = c1.Interfaces 17380Dim c2Interfaces = c2.Interfaces 17482Dim c1Interfaces = c1.Interfaces 17494Dim c2Interfaces = c2.Interfaces 17506Dim c3Interfaces = c3.Interfaces 17517Dim c4Interfaces = c4.Interfaces 17569Dim c3Interfaces = c3.Interfaces 17621Dim c3Interfaces = c3.Interfaces 21351Assert.Equal("ITest(Of (notA As System.Int32, notB As System.Int32))", derived1.Interfaces(0).ToTestDisplayString()) 21354Assert.Equal("ITest(Of (a As System.Int32, b As System.Int32))", derived2.Interfaces(0).ToTestDisplayString()) 21361Assert.Same(m, derived1.FindImplementationForInterfaceMember(DirectCast(derived1.Interfaces(0), TypeSymbol).GetMember("M"))) 21362Assert.Same(m, derived1.FindImplementationForInterfaceMember(DirectCast(derived2.Interfaces(0), TypeSymbol).GetMember("M"))) 21363Assert.Same(m, derived2.FindImplementationForInterfaceMember(DirectCast(derived1.Interfaces(0), TypeSymbol).GetMember("M"))) 21364Assert.Same(m, derived2.FindImplementationForInterfaceMember(DirectCast(derived2.Interfaces(0), TypeSymbol).GetMember("M"))) 21487Assert.Equal("ITest(Of (notA As System.Int32, notB As System.Int32))", derived1.Interfaces(0).ToTestDisplayString()) 21490Assert.Equal("ITest(Of (a As System.Int32, b As System.Int32))", derived2.Interfaces(0).ToTestDisplayString()) 21496Assert.Same(m, derived1.FindImplementationForInterfaceMember(DirectCast(derived1.Interfaces(0), TypeSymbol).GetMember("M"))) 21497Assert.Same(m, derived1.FindImplementationForInterfaceMember(DirectCast(derived2.Interfaces(0), TypeSymbol).GetMember("M"))) 21498Assert.Same(m, derived2.FindImplementationForInterfaceMember(DirectCast(derived1.Interfaces(0), TypeSymbol).GetMember("M"))) 21499Assert.Same(m, derived2.FindImplementationForInterfaceMember(DirectCast(derived2.Interfaces(0), TypeSymbol).GetMember("M")))
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (10)
SymbolsTests\AnonymousTypes\AnonymousTypesSemanticsTests.vb (10)
633Assert.Equal(0, typeInfo.Type.Interfaces.Length) 638Assert.Equal(1, typeInfo.Type.Interfaces.Length) 674Assert.Equal(1, typeInfo.Type.Interfaces.Length) 712Assert.Equal(1, typeInfo.Type.Interfaces.Length) 717Assert.Equal(0, typeInfo.Type.Interfaces.Length) 755Assert.Equal(0, typeInfo.Type.Interfaces.Length) 796Assert.Equal(0, typeInfo.Type.Interfaces.Length) 832Assert.Equal(1, typeInfo.Type.Interfaces.Length) 874Assert.Equal(0, typeInfo.Type.Interfaces.Length) 879Assert.Equal(1, typeInfo.Type.Interfaces.Length)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (2)
216If namedType.Interfaces.Length = 0 Then 220Dim types = namedType.Interfaces.Select(Function(t) t.GenerateTypeSyntax())
Microsoft.CodeAnalysis.Workspaces (8)
Editing\SyntaxGenerator.cs (3)
768interfaceTypes: type.Interfaces.Select(TypeExpression), 776interfaceTypes: type.Interfaces.Select(TypeExpression), 782interfaceTypes: type.Interfaces.Select(TypeExpression),
FindSymbols\FindReferences\DependentTypeFinder.cs (2)
25/// types based either on <see cref="ITypeSymbol.BaseType"/> or <see cref="ITypeSymbol.Interfaces"/>. 522foreach (var interfaceType in type.Interfaces)
Shared\Extensions\ISymbolExtensions.cs (1)
498return typeSymbol.Interfaces.FirstOrDefault();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
105foreach (var interfaceType in type.Interfaces)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
29namedType.Interfaces,
Microsoft.Interop.ComInterfaceGenerator (1)
ComInterfaceInfo.cs (1)
295foreach (var implemented in comIface.Interfaces)
Microsoft.VisualStudio.LanguageServices (4)
Library\ObjectBrowser\AbstractListItemFactory.cs (2)
220foreach (var interfaceSymbol in namedTypeSymbol.Interfaces) 269if (typeSymbol.Interfaces.Length > 0)
Library\ObjectBrowser\ObjectList.cs (1)
443if (typeSymbol.TypeKind == TypeKind.Interface && typeSymbol.Interfaces.IsEmpty)
PullMemberUp\MainDialog\BaseTypeTreeNodeViewModel.cs (1)
57currentTreeNode.BaseTypeNodes = currentTypeSymbol.Interfaces
Microsoft.VisualStudio.LanguageServices.VisualBasic (6)
CodeModel\Extenders\GenericExtender.vb (6)
45Return typeSymbol.Interfaces.Length 52Return typeSymbol.Interfaces.Length 80Return If(index >= 0 AndAlso index < typeSymbol.Interfaces.Length, 81typeSymbol.Interfaces(index).ToDisplayString(), 89Return If(index >= 0 AndAlso index < typeSymbol.Interfaces.Length, 90typeSymbol.Interfaces(index).ToDisplayString(),