704 references to Interface
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (1)
602if (!(typeSymbol.IsAbstract || typeSymbol.TypeKind is TypeKind.Interface))
GenerateDocumentationAndConfigFiles (21)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (3)
49if (type.TypeKind == TypeKind.Interface) 56case TypeKind.Interface: 71if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
106private static readonly SymbolKindOrTypeKind s_interface = new(TypeKind.Interface); 335case TypeKind.Interface:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
64new SymbolKindOrTypeKind(TypeKind.Interface),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
124member.ContainingType is { TypeKind: TypeKind.Interface } interfaceBeingImplemented)
ILLink.RoslynAnalyzer (2)
ISymbolExtensions.cs (1)
193return typeSymbol.TypeKind == TypeKind.Interface;
TrimAnalysis\SingleValueExtensions.cs (1)
26TypeKind.Class or TypeKind.Enum or TypeKind.Interface or TypeKind.Struct =>
Metrics (21)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
135case TypeKind.Interface:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (3)
49if (type.TypeKind == TypeKind.Interface) 56case TypeKind.Interface: 71if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
106private static readonly SymbolKindOrTypeKind s_interface = new(TypeKind.Interface); 335case TypeKind.Interface:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
64new SymbolKindOrTypeKind(TypeKind.Interface),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
Metrics.Legacy (21)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
135case TypeKind.Interface:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (3)
49if (type.TypeKind == TypeKind.Interface) 56case TypeKind.Interface: 71if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
106private static readonly SymbolKindOrTypeKind s_interface = new(TypeKind.Interface); 335case TypeKind.Interface:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
64new SymbolKindOrTypeKind(TypeKind.Interface),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
Microsoft.Analyzers.Extra (1)
CallAnalysis\CallAnalyzer.Handlers.cs (1)
42if (type.TypeKind == TypeKind.Interface)
Microsoft.Analyzers.Local (1)
CallAnalysis\CallAnalyzer.Handlers.cs (1)
42if (type.TypeKind == TypeKind.Interface)
Microsoft.AspNetCore.App.Analyzers (1)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
107if (source.TypeKind == TypeKind.Interface)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\Emitters\EndpointParameterEmitter.cs (1)
340var receiverType = endpointParameter.BindableMethodSymbol?.ReceiverType is { TypeKind: TypeKind.Interface } targetType
Microsoft.AspNetCore.Mvc.Analyzers (1)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
107if (source.TypeKind == TypeKind.Interface)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
107if (source.TypeKind == TypeKind.Interface)
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
XmlComments\XmlComment.InheritDoc.cs (1)
303else if (typeSymbol.TypeKind == TypeKind.Interface)
Microsoft.CodeAnalysis.Analyzers (22)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
135case TypeKind.Interface:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (3)
49if (type.TypeKind == TypeKind.Interface) 56case TypeKind.Interface: 71if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
106private static readonly SymbolKindOrTypeKind s_interface = new(TypeKind.Interface); 335case TypeKind.Interface:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
64new SymbolKindOrTypeKind(TypeKind.Interface),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
124member.ContainingType is { TypeKind: TypeKind.Interface } interfaceBeingImplemented)
Microsoft.CodeAnalysis.AnalyzerUtilities (24)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
135case TypeKind.Interface:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (3)
49if (type.TypeKind == TypeKind.Interface) 56case TypeKind.Interface: 71if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (1)
37Debug.Assert(CollectionNamedTypes.All(ct => ct.TypeKind == TypeKind.Interface));
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataSymbolMap.cs (1)
124if (namedTypeSymbol.TypeKind == TypeKind.Interface
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
1349static bool IsInterfaceOrTypeParameter(ITypeSymbol? type) => type?.TypeKind is TypeKind.Interface or TypeKind.TypeParameter;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
106private static readonly SymbolKindOrTypeKind s_interface = new(TypeKind.Interface); 335case TypeKind.Interface:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
64new SymbolKindOrTypeKind(TypeKind.Interface),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
Microsoft.CodeAnalysis.BannedApiAnalyzers (22)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
135case TypeKind.Interface:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (3)
49if (type.TypeKind == TypeKind.Interface) 56case TypeKind.Interface: 71if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
106private static readonly SymbolKindOrTypeKind s_interface = new(TypeKind.Interface); 335case TypeKind.Interface:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
64new SymbolKindOrTypeKind(TypeKind.Interface),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
124member.ContainingType is { TypeKind: TypeKind.Interface } interfaceBeingImplemented)
Microsoft.CodeAnalysis.CodeStyle (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
106private static readonly SymbolKindOrTypeKind s_interface = new(TypeKind.Interface); 335case TypeKind.Interface:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
64new SymbolKindOrTypeKind(TypeKind.Interface),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
Microsoft.CodeAnalysis.CodeStyle.Fixes (16)
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AddAccessibilityModifiersHelpers.cs (1)
50if (symbol.ContainingType?.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (2)
29TypeKind.Interface 46if (typeToGenerateIn.TypeKind == TypeKind.Interface && isStatic)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (2)
75generateMethodBodies: _state.TypeToGenerateIn.TypeKind != TypeKind.Interface)), 91generateMethodBodies: _state.TypeToGenerateIn.TypeKind != TypeKind.Interface)),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.cs (1)
46state.TypeToGenerateIn.TypeKind != TypeKind.Interface &&
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (2)
193return isAbstract || State.TypeToGenerateIn.TypeKind == TypeKind.Interface || throwStatement == null 225if (State.TypeToGenerateIn.TypeKind != TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (2)
117return _state.TypeToGenerateIn.TypeKind != TypeKind.Interface && _refKind != RefKind.None 124if (state.TypeToGenerateIn.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (3)
95if (state.TypeToGenerateIn.TypeKind == TypeKind.Interface && state.IsStatic) 105var isOnlyReadAndIsInInterface = state.TypeToGenerateIn.TypeKind == TypeKind.Interface && !state.IsWrittenTo; 139if (state.TypeToGenerateIn.TypeKind != TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
85if (this.TypeToGenerateIn.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
249if (idisposable?.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
124member.ContainingType is { TypeKind: TypeKind.Interface } interfaceBeingImplemented)
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (1)
src\Features\DiagnosticsTestUtilities\NamingStyles\NamingStylesTestOptionSets.cs (1)
615[new SymbolSpecification.SymbolKindOrTypeKind(TypeKind.Interface)],
Microsoft.CodeAnalysis.CSharp (55)
Binder\Binder_Constraints.cs (1)
589case TypeKind.Interface:
Binder\Binder_Conversions.cs (1)
788case TypeKind.Interface:
Binder\Binder_Crefs.cs (1)
776case TypeKind.Interface:
Binder\Binder_Expressions.cs (2)
5224case TypeKind.Interface: 9637case TypeKind.Interface:
Binder\Binder_Lookup.cs (2)
261case TypeKind.Interface: 1941case TypeKind.Interface:
Binder\Binder_Patterns.cs (1)
1253if (iTupleType.TypeKind != TypeKind.Interface)
Binder\ForEachLoopBinder.cs (1)
1655case TypeKind.Interface:
Binder\Semantics\Conversions\ConversionsBase.cs (1)
2659case TypeKind.Interface:
Binder\Semantics\Operators\OperatorFacts.cs (1)
24case TypeKind.Interface:
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (2)
2324case TypeKind.Interface: 2701case TypeKind.Interface:
Compiler\ClsComplianceChecker.cs (1)
1002case TypeKind.Interface:
Compiler\MethodCompiler.cs (1)
643containingType is { IsImplicitlyDeclared: false, TypeKind: TypeKind.Class or TypeKind.Struct or TypeKind.Interface } &&
Emitter\NoPia\EmbeddedType.cs (1)
161case TypeKind.Interface:
Emitter\NoPia\EmbeddedTypesManager.cs (2)
268case TypeKind.Interface: 456if (containerKind == TypeKind.Interface || containerKind == TypeKind.Delegate ||
FlowAnalysis\NullableWalker.cs (1)
5855{ TypeKind: TypeKind.Interface } => type.AllInterfacesNoUseSiteDiagnostics,
SymbolDisplay\SymbolDisplayVisitor.cs (1)
375(containingType.TypeKind != TypeKind.Interface && !IsEnumMember(symbol) & !IsLocalFunction(symbol))))
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
936(containingType.TypeKind != TypeKind.Interface && !IsEnumMember(symbol) && !IsLocalFunction(symbol))))
SymbolDisplay\SymbolDisplayVisitor.Types.cs (2)
652case TypeKind.Interface: 775case TypeKind.Interface:
Symbols\ConstraintsHelper.cs (1)
219case TypeKind.Interface:
Symbols\EnumConversions.cs (1)
33return TypeKind.Interface;
Symbols\Metadata\PE\MetadataDecoder.cs (1)
397case TypeKind.Interface:
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
97case TypeKind.Interface:
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2028result = TypeKind.Interface;
Symbols\NamedTypeSymbol.cs (1)
1667/// Requires less computation than <see cref="TypeSymbol.TypeKind"/> == <see cref="TypeKind.Interface"/>.
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
195case TypeKind.Interface:
Symbols\Source\SourceMemberContainerSymbol.cs (6)
347case TypeKind.Interface: 380case TypeKind.Interface: 825return this.TypeKind == TypeKind.Interface; 1409case TypeKind.Interface: 3562case TypeKind.Interface: 3832case TypeKind.Interface:
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
520case TypeKind.Interface:
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1483if (ContainingSymbol is NamedTypeSymbol { IsComImport: true, TypeKind: TypeKind.Class or TypeKind.Interface })
Symbols\Source\SourceNamedTypeSymbol.cs (1)
821case TypeKind.Interface:
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (5)
513if (guessTypeKind == TypeKind.Interface) 550case TypeKind.Interface: 633(TypeKind != TypeKind.Class || baseType.TypeKind == TypeKind.Interface || ((TypeDeclarationSyntax)decl.SyntaxReference.GetSyntax()).ParameterList is null)) 669bool isInterface = (typeKind == TypeKind.Interface); 746case TypeKind.Interface:
Symbols\Symbol_Attributes.cs (1)
79case TypeKind.Interface:
Symbols\Synthesized\SynthesizedContainer.cs (1)
48internal sealed override bool IsInterface => this.TypeKind == TypeKind.Interface;
Symbols\TypeParameterSymbol.cs (1)
414case TypeKind.Interface:
Symbols\TypeSymbolExtensions.cs (4)
704case TypeKind.Interface: 779case TypeKind.Interface: 853case TypeKind.Interface: 1519case TypeKind.Interface:
Symbols\VarianceSafety.cs (2)
82case TypeKind.Interface: 376case TypeKind.Interface:
Utilities\TypeSymbolExtensions.cs (2)
189case TypeKind.Interface: 281case TypeKind.Interface:
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
212if (containingType != null && containingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
1084if (!original.IsReferenceType || original.TypeKind == TypeKind.Interface) 1408if (originalMemberSymbol.ContainingType.TypeKind == TypeKind.Interface)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
71if (interfaceSymbolInfo.GetAnySymbol() is INamedTypeSymbol interfaceType && interfaceType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
298if (constraintType.IsReferenceType && constraintType.TypeKind != TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
212namedType.TypeKind == TypeKind.Interface ? SyntaxKind.InterfaceDeclaration : SyntaxKind.ClassDeclaration;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (2)
60typeParameter.ConstraintTypes.Where(t => t.TypeKind == TypeKind.Interface).Concat( 61typeParameter.ConstraintTypes.Where(t => t.TypeKind is not TypeKind.Class and not TypeKind.Interface)));
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (2)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (2)
225[InlineData("interface [|c2|] { }", "interface C2 { }", TypeKind.Interface, Accessibility.Private)] 245var alternateSymbolKind = TypeKind.Class.Equals(symbolKind) ? TypeKind.Interface : TypeKind.Class;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (26)
CodeActions\GenerateType\GenerateTypeTests_Dialog.cs (26)
376typeKind: TypeKind.Interface, 581typeKind: TypeKind.Interface, 629typeKind: TypeKind.Interface, 678typeKind: TypeKind.Interface, 727typeKind: TypeKind.Interface, 767typeKind: TypeKind.Interface, 805typeKind: TypeKind.Interface, 846typeKind: TypeKind.Interface, 892typeKind: TypeKind.Interface, 930typeKind: TypeKind.Interface, 977typeKind: TypeKind.Interface, 1028typeKind: TypeKind.Interface, 1081typeKind: TypeKind.Interface, 1140typeKind: TypeKind.Interface, 1187typeKind: TypeKind.Interface, 1238typeKind: TypeKind.Interface, 1301typeKind: TypeKind.Interface, 1342typeKind: TypeKind.Interface, 1391typeKind: TypeKind.Interface, 1432typeKind: TypeKind.Interface, 1482typeKind: TypeKind.Interface, 1524typeKind: TypeKind.Interface, 2113typeKind: TypeKind.Interface, 2137typeKind: TypeKind.Interface, 2479typeKind: TypeKind.Interface, 2516typeKind: TypeKind.Interface,
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
Emit\EmitMetadataTests.cs (4)
318Assert.Equal(TypeKind.Interface, i1.TypeKind); 319Assert.Equal(TypeKind.Interface, i2.TypeKind); 320Assert.Equal(TypeKind.Interface, i3.TypeKind); 2076Assert.Equal(TypeKind.Interface, beginInvoke.ReturnType.TypeKind);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
RefStructInterfacesTests.cs (1)
29338Assert.Equal(TypeKind.Interface, itest29.TypeKind);
Microsoft.CodeAnalysis.CSharp.Features (6)
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.NameGenerator.cs (1)
105if (type.TypeKind == TypeKind.Interface)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.ItemGetter.cs (2)
100if (symbol is not { TypeKind: TypeKind.Interface }) 108if (containingType is not INamedTypeSymbol { TypeKind: TypeKind.Class or TypeKind.Struct or TypeKind.Interface })
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
2557{ ContainingType.TypeKind: TypeKind.Interface }
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (1)
137info.ConvertedType.TypeKind != TypeKind.Interface)
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
71if (interfaceSymbolInfo.GetAnySymbol() is INamedTypeSymbol interfaceType && interfaceType.TypeKind == TypeKind.Interface)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (2)
225[InlineData("interface [|c2|] { }", "interface C2 { }", TypeKind.Interface, Accessibility.Private)] 245var alternateSymbolKind = TypeKind.Class.Equals(symbolKind) ? TypeKind.Interface : TypeKind.Class;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (15)
Semantics\NativeIntegerTests.cs (1)
15424Assert.Equal(TypeKind.Interface, symbol.TypeKind);
Semantics\NullableReferenceTypesTests.cs (6)
116692Assert.Equal(TypeKind.Interface, compilation1.GetTypeByMetadataName("I1").TypeKind); 116712Assert.Equal(TypeKind.Interface, compilation2.GetTypeByMetadataName("I1").TypeKind); 116723Assert.Equal(TypeKind.Interface, compilation3.GetTypeByMetadataName("I1").TypeKind); 116752Assert.Equal(TypeKind.Interface, i1.TypeKind); 116820Assert.Equal(TypeKind.Interface, i1.TypeKind); 116832Assert.Equal(TypeKind.Interface, compilation7.GetTypeByMetadataName("I1").TypeKind);
Semantics\ScriptSemanticsTests.cs (1)
463Assert.Equal(TypeKind.Interface, members[0].TypeKind);
Semantics\UseSiteErrorTests.cs (7)
2313Assert.Equal(TypeKind.Interface, compilation1.GetTypeByMetadataName("I1").TypeKind); 2331Assert.Equal(TypeKind.Interface, compilation2.GetTypeByMetadataName("I1").TypeKind); 2342Assert.Equal(TypeKind.Interface, compilation3.GetTypeByMetadataName("I1").TypeKind); 2371Assert.Equal(TypeKind.Interface, i1.TypeKind); 2387Assert.Equal(TypeKind.Interface, compilation5.GetTypeByMetadataName("I1").TypeKind); 2416Assert.Equal(TypeKind.Interface, i1.TypeKind); 2428Assert.Equal(TypeKind.Interface, compilation7.GetTypeByMetadataName("I1").TypeKind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (75)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
2983Assert.Equal(TypeKind.Interface, dsym2.TypeKind); 4779Assert.Equal(TypeKind.Interface, interfaceSymbol.TypeKind);
Compilation\SemanticModelGetSemanticInfoTests.cs (15)
2190Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 2192Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 12255Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14080Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14082Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14118Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14120Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14244Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14246Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14336Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14338Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14379Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14381Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14540Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14542Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind);
Symbols\CompilationCreationTests.cs (1)
2461Assert.Equal(TypeKind.Interface, asm5[1].GlobalNamespace.GetTypeMembers("I1").Single().TypeKind);
Symbols\Metadata\MetadataTypeTests.cs (1)
187Assert.Equal(TypeKind.Interface, type1.TypeKind);
Symbols\Metadata\PE\LoadingEvents.cs (7)
196Assert.Equal(TypeKind.Interface, @interface.TypeKind); 223Assert.Equal(TypeKind.Interface, @interface.TypeKind); 255Assert.Equal(TypeKind.Interface, @interface.TypeKind); 291Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 296Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 332Assert.Equal(TypeKind.Interface, outerInterface.TypeKind); 342Assert.Equal(TypeKind.Interface, innerInterface.TypeKind);
Symbols\Metadata\PE\LoadingMethods.cs (14)
389Assert.Equal(TypeKind.Interface, @interface.TypeKind); 413Assert.Equal(TypeKind.Interface, interface1.TypeKind); 418Assert.Equal(TypeKind.Interface, interface2.TypeKind); 449Assert.Equal(TypeKind.Interface, @interface.TypeKind); 485Assert.Equal(TypeKind.Interface, @interface.TypeKind); 517Assert.Equal(TypeKind.Interface, cyclicInterface.TypeKind); 520Assert.Equal(TypeKind.Interface, implementedInterface.TypeKind); 545Assert.Equal(TypeKind.Interface, cyclicInterface.TypeKind); 576Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 581Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 637Assert.Equal(TypeKind.Interface, @interface.TypeKind); 670Assert.Equal(TypeKind.Interface, @interface.TypeKind); 704Assert.Equal(TypeKind.Interface, outerInterface.TypeKind); 714Assert.Equal(TypeKind.Interface, innerInterface.TypeKind);
Symbols\Metadata\PE\LoadingProperties.cs (8)
30Assert.Equal(TypeKind.Interface, @interface.TypeKind); 57Assert.Equal(TypeKind.Interface, @interface.TypeKind); 89Assert.Equal(TypeKind.Interface, @interface.TypeKind); 125Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 130Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 166Assert.Equal(TypeKind.Interface, outerInterface.TypeKind); 176Assert.Equal(TypeKind.Interface, innerInterface.TypeKind); 228Assert.Equal(TypeKind.Interface, @interface.TypeKind);
Symbols\Metadata\PE\NoPia.cs (4)
268Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 269Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind); 602Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 603Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind);
Symbols\Metadata\PE\TypeKindTests.cs (1)
68Assert.Equal(TypeKind.Interface, ienumerable.TypeKind);
Symbols\MockNamedTypeSymbol.cs (1)
153get { return _typeKind == TypeKind.Interface; }
Symbols\Retargeting\NoPia.cs (6)
571Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 572Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind); 872Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 873Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind); 1176Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 1177Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind);
Symbols\Source\DelegateTests.cs (1)
162Assert.Equal(TypeKind.Interface, beginInvoke.ReturnType.TypeKind);
Symbols\Source\FieldTests.cs (1)
214Assert.Equal(TypeKind.Interface, sym.Type.TypeKind);
Symbols\Source\MethodTests.cs (4)
1668Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1712Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1757Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1808Assert.Equal(TypeKind.Interface, @interface.TypeKind);
Symbols\Source\PropertyTests.cs (3)
1751Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1785Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1823Assert.Equal(TypeKind.Interface, @interface.TypeKind);
Symbols\TypeTests.cs (6)
289Assert.Equal(TypeKind.Interface, type4.TypeKind); 300Assert.Equal(TypeKind.Interface, type3.TypeKind); 856Assert.Equal(TypeKind.Interface, igoo.TypeKind); 1312Assert.Equal(TypeKind.Interface, interface1.TypeKind); 1313Assert.Equal(TypeKind.Interface, interface2.TypeKind); 1776Assert.Equal(TypeKind.Interface, ((ITypeSymbol)tinfo.Type).TypeKind);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\ReadOnlyStructs.cs (1)
134Assert.Equal(TypeKind.Interface, s3.TypeKind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
Extensions.cs (1)
473if ((typeSym.TypeKind == TypeKind.Interface || typeSym.TypeKind == TypeKind.Class || typeSym.TypeKind == TypeKind.Struct || typeSym.TypeKind == TypeKind.Delegate))
UsesIsNullableVisitor.cs (2)
172case TypeKind.Interface: 188case TypeKind.Interface:
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
212if (containingType != null && containingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
1084if (!original.IsReferenceType || original.TypeKind == TypeKind.Interface) 1408if (originalMemberSymbol.ContainingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
298if (constraintType.IsReferenceType && constraintType.TypeKind != TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
212namedType.TypeKind == TypeKind.Interface ? SyntaxKind.InterfaceDeclaration : SyntaxKind.ClassDeclaration;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (2)
60typeParameter.ConstraintTypes.Where(t => t.TypeKind == TypeKind.Interface).Concat( 61typeParameter.ConstraintTypes.Where(t => t.TypeKind is not TypeKind.Class and not TypeKind.Interface)));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
CodeGeneration\CodeGenerationTests.CSharp.cs (2)
221[InlineData("interface", TypeKind.Interface)] 306typeKind: TypeKind.Interface);
CodeGeneration\CodeGenerationTests.VisualBasic.cs (1)
229typeKind: TypeKind.Interface);
Microsoft.CodeAnalysis.Extensions.Package (13)
Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
Microsoft.CodeAnalysis.Features (46)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs (1)
56ContainingType.TypeKind == TypeKind.Interface ||
Completion\Providers\AbstractObjectCreationCompletionProvider.cs (1)
85if (type.TypeKind is TypeKind.Interface or TypeKind.Pointer or TypeKind.Dynamic ||
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
91if (namedType.TypeKind == TypeKind.Interface)
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer_Constraints.cs (1)
31=> CheckConstraints(receiverTypeSymbol, typeParameter, TypeKind.Interface, static type => type.GetAllInterfacesIncludingThis());
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
279if (collectionType.TypeKind == TypeKind.Interface && knownCollectionInterfaces.Contains(collectionType.OriginalDefinition))
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (3)
332TypeKind.Interface => FeaturesResources.interface_, 3844if (symbol.ContainingType is { TypeKind: TypeKind.Interface }) 6021var isInInterface = newMember.ContainingType.TypeKind == TypeKind.Interface;
ExtractInterface\AbstractExtractInterfaceService.cs (3)
144typeKind: TypeKind.Interface, 263var candidateInterfaceName = type.TypeKind == TypeKind.Interface ? type.Name : "I" + type.Name; 320if (typeToExtractFrom.TypeKind == TypeKind.Interface)
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.State.cs (1)
70if (ContainingType == null || ContainingType.TypeKind == TypeKind.Interface)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
179if (info.ContainingType != null && info.ContainingType.TypeKind != TypeKind.Interface)
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (4)
139if (_state.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface || argumentList.Count == 0) 277if (_state.BaseTypeOrInterfaceOpt == null || _state.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface) 287if (_state.BaseTypeOrInterfaceOpt != null && _state.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface) 316? TypeKind.Interface
GenerateType\AbstractGenerateTypeService.State.cs (2)
240if (baseType.TypeKind is not TypeKind.Class and not TypeKind.Interface) 270(BaseTypeOrInterfaceOpt == null || BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface))
GoToBase\FindBaseHelpers.cs (1)
18TypeKind: TypeKind.Class or TypeKind.Interface or TypeKind.Struct,
InheritanceMargin\AbstractInheritanceMarginService.cs (1)
73return !symbol.IsStatic && namedType.TypeKind is TypeKind.Interface or TypeKind.Class or TypeKind.Struct;
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (1)
315if (memberSymbol.TypeKind == TypeKind.Interface)
InitializeParameter\AbstractInitializeParameterCodeRefactoringProvider.cs (1)
84methodSymbol.ContainingType.TypeKind == TypeKind.Interface)
IntroduceVariable\AbstractIntroduceVariableService.State.cs (1)
98if (containingType?.TypeKind is TypeKind.Interface)
PullMemberUp\MemberAndDestinationValidator.cs (1)
17if (destination.TypeKind is not TypeKind.Interface and not TypeKind.Class)
PullMemberUp\MembersPuller.cs (3)
66TypeKind.Interface => PullMembersIntoInterfaceAsync(document, pullMembersUpOptions, cancellationToken), 127if (analysisResult.Member.ContainingType.TypeKind == TypeKind.Interface) 492return destination.TypeKind == TypeKind.Interface
PullMemberUp\PullMembersUpOptionsBuilder.cs (1)
18if (destination.TypeKind == TypeKind.Interface)
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (1)
379if (property.ContainingType.TypeKind == TypeKind.Interface)
Shared\Extensions\ISymbolExtensions_2.cs (1)
73case TypeKind.Interface:
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AddAccessibilityModifiersHelpers.cs (1)
50if (symbol.ContainingType?.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (2)
29TypeKind.Interface 46if (typeToGenerateIn.TypeKind == TypeKind.Interface && isStatic)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (2)
75generateMethodBodies: _state.TypeToGenerateIn.TypeKind != TypeKind.Interface)), 91generateMethodBodies: _state.TypeToGenerateIn.TypeKind != TypeKind.Interface)),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.cs (1)
46state.TypeToGenerateIn.TypeKind != TypeKind.Interface &&
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (2)
193return isAbstract || State.TypeToGenerateIn.TypeKind == TypeKind.Interface || throwStatement == null 225if (State.TypeToGenerateIn.TypeKind != TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (2)
117return _state.TypeToGenerateIn.TypeKind != TypeKind.Interface && _refKind != RefKind.None 124if (state.TypeToGenerateIn.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (3)
95if (state.TypeToGenerateIn.TypeKind == TypeKind.Interface && state.IsStatic) 105var isOnlyReadAndIsInInterface = state.TypeToGenerateIn.TypeKind == TypeKind.Interface && !state.IsWrittenTo; 139if (state.TypeToGenerateIn.TypeKind != TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
85if (this.TypeToGenerateIn.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
249if (idisposable?.TypeKind == TypeKind.Interface)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (22)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
135case TypeKind.Interface:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (3)
49if (type.TypeKind == TypeKind.Interface) 56case TypeKind.Interface: 71if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
106private static readonly SymbolKindOrTypeKind s_interface = new(TypeKind.Interface); 335case TypeKind.Interface:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
64new SymbolKindOrTypeKind(TypeKind.Interface),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
124member.ContainingType is { TypeKind: TypeKind.Interface } interfaceBeingImplemented)
Microsoft.CodeAnalysis.PublicApiAnalyzers (21)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
135case TypeKind.Interface:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (3)
49if (type.TypeKind == TypeKind.Interface) 56case TypeKind.Interface: 71if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
106private static readonly SymbolKindOrTypeKind s_interface = new(TypeKind.Interface); 335case TypeKind.Interface:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
64new SymbolKindOrTypeKind(TypeKind.Interface),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
Microsoft.CodeAnalysis.ResxSourceGenerator (21)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
135case TypeKind.Interface:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (3)
49if (type.TypeKind == TypeKind.Interface) 56case TypeKind.Interface: 71if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
106private static readonly SymbolKindOrTypeKind s_interface = new(TypeKind.Interface); 335case TypeKind.Interface:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
64new SymbolKindOrTypeKind(TypeKind.Interface),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
Microsoft.CodeAnalysis.Test.Utilities (3)
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (3)
211else if (derivedType.TypeKind == TypeKind.Interface) 265if ((targetTypeKind == sourceTypeKind && (targetTypeKind == TypeKind.Class || targetTypeKind == TypeKind.Interface)) || 266(targetTypeKind == TypeKind.Class && (sourceTypeKind == TypeKind.Structure || sourceTypeKind == TypeKind.Interface) && targetType.SpecialType == SpecialType.System_Object))
Microsoft.CodeAnalysis.VisualBasic (52)
Binding\Binder_Conversions.vb (1)
797Case TypeKind.Interface
Binding\Binder_Expressions.vb (2)
1213Case TYPEKIND.Interface 3808Case TYPEKIND.TypeParameter, TYPEKIND.Interface
Binding\Binder_Lookup.vb (5)
586Case TypeKind.Interface 615Case TypeKind.Interface 936Case TypeKind.Interface 1104Case TypeKind.Interface 1697Case TypeKind.Interface
Binding\Binder_ObjectInitializer.vb (2)
220Case TypeKind.Interface 227TypeKind.Interface
Binding\Binder_Utils.vb (2)
1180Case TypeKind.Interface 1253Case TypeKind.Interface
Compilation\ClsComplianceChecker.vb (2)
595Case TypeKind.Class, TypeKind.Structure, TypeKind.Interface, TypeKind.Delegate, TypeKind.Enum, TypeKind.Submission, TypeKind.Module 621Case TypeKind.Class, TypeKind.Structure, TypeKind.Interface, TypeKind.Delegate, TypeKind.Enum, TypeKind.Submission, TypeKind.Module
Compilation\DocumentationComments\DocumentationCommentCompiler.Common.vb (1)
743Case TypeKind.Interface
Emit\NamedTypeSymbolAdapter.vb (1)
462Case TypeKind.Enum, TypeKind.Interface, TypeKind.Delegate
Emit\NoPia\EmbeddedType.vb (1)
128Case TypeKind.Enum, TypeKind.Delegate, TypeKind.Interface
Emit\NoPia\EmbeddedTypesManager.vb (2)
221Case TypeKind.Interface 382If containerKind = TypeKind.Interface OrElse
Semantics\AccessCheck.vb (2)
444Case TypeKind.Interface 506Case TypeKind.Interface
Semantics\Conversions.vb (1)
2878Case TypeKind.Interface
Semantics\TypeInference\TypeArgumentInference.vb (2)
1781If fixedTypeTypeKind <> TypeKind.Class AndAlso fixedTypeTypeKind <> TypeKind.Interface Then 1808Debug.Assert(fixedTypeTypeKind = TypeKind.Interface)
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
616(containingType.TypeKind <> TypeKind.Interface AndAlso Not IsEnumMember(symbol))) Then
SymbolDisplay\SymbolDisplayVisitor.Types.vb (2)
265Case TypeKind.Interface 461Case TypeKind.Interface
SymbolDisplay\SymbolDisplayVisitor.vb (1)
349(containingType.TypeKind <> TypeKind.Interface AndAlso Not IsEnumMember(symbol))) Then
Symbols\ConstraintsHelper.vb (1)
215Case TypeKind.Interface,
Symbols\Metadata\PE\MetadataDecoder.vb (1)
349Case TypeKind.Interface
Symbols\Metadata\PE\PENamedTypeSymbol.vb (1)
1018result = TypeKind.Interface
Symbols\NamedTypeSymbol.vb (2)
822If Me.TypeKind = TypeKind.Interface Then 1088''' Requires less computation than <see cref="TypeSymbol.TypeKind"/>== <see cref="TypeKind.Interface"/>.
Symbols\Source\OverrideHidingHelper.vb (1)
27Case TypeKind.Class, TypeKind.Interface, TypeKind.Structure
Symbols\Source\SourceMemberContainerTypeSymbol.vb (5)
37[Interface] = CUShort(TypeKind.Interface) << TypeKindShift 338Case TypeKind.Interface 1268Return Me.TypeKind = TypeKind.Interface 3503If myTypeKind = TypeKind.Class OrElse myTypeKind = TypeKind.Interface OrElse myTypeKind = TypeKind.Structure OrElse myTypeKind = TypeKind.Module Then 3507Dim canDeclareOperators As Boolean = (myTypeKind <> TypeKind.Module AndAlso myTypeKind <> TypeKind.Interface)
Symbols\Source\SourceMemberMethodSymbol.vb (1)
757Case TypeKind.Interface, TypeKind.Structure, TypeKind.Enum, TypeKind.Delegate
Symbols\Source\SourceNamedTypeSymbol.vb (6)
1118Case TypeKind.Interface, TypeKind.Enum, TypeKind.Delegate, TypeKind.Structure, TypeKind.Module, TypeKind.Array ' array can't really occur 1192Case TypeKind.Interface, TypeKind.Error 1243Case TypeKind.Interface, TypeKind.Error 1388Case TypeKind.Interface 1507Debug.Assert(Me.TypeKind <> TypeKind.Interface) 2264Case TypeKind.Interface
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (1)
966Return TypeKind.Interface
Symbols\Symbol_Attributes.vb (1)
105Case TypeKind.Interface
Symbols\SymbolExtensions.vb (1)
39Case TypeKind.Interface
Symbols\TypeSymbolExtensions.vb (3)
412Case TypeKind.Interface, TypeKind.TypeParameter, TypeKind.Unknown 832TypeKind.Interface, 865TypeKind.Interface,
Microsoft.CodeAnalysis.Workspaces (28)
Classification\ClassificationExtensions.cs (1)
15TypeKind.Interface => ClassificationTypeNames.InterfaceName,
Editing\SyntaxGenerator.cs (2)
786TypeKind.Interface => InterfaceDeclaration( 899case TypeKind.Interface:
FindSymbols\FindReferences\DependentTypeFinder.cs (1)
46private static readonly Func<INamedTypeSymbol, bool> s_isInterface = static t => t is { TypeKind: TypeKind.Interface };
FindSymbols\FindReferences\DependentTypeFinder_ImplementingTypes.cs (1)
22if (type?.TypeKind == TypeKind.Interface)
Recommendations\AbstractRecommendationServiceRunner.cs (1)
465else if (originalConstraintType.TypeKind == TypeKind.Interface)
Rename\RenameUtilities.cs (1)
226symbol.ContainingType.TypeKind == TypeKind.Interface)
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
108((INamedTypeSymbol)referencedSymbol.ContainingSymbol).TypeKind == TypeKind.Interface &&
Shared\Extensions\ISymbolExtensions.cs (1)
495else if (typeSymbol.TypeKind == TypeKind.Interface)
Shared\Extensions\ITypeSymbolExtensions.cs (2)
159typeSymbol.TypeKind == TypeKind.Interface) 196if (type.TypeKind == TypeKind.Interface &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
106private static readonly SymbolKindOrTypeKind s_interface = new(TypeKind.Interface); 335case TypeKind.Interface:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
64new SymbolKindOrTypeKind(TypeKind.Interface),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
124member.ContainingType is { TypeKind: TypeKind.Interface } interfaceBeingImplemented)
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
EditorConfigParsing\NamingStyleParserTests.cs (1)
159symbolKind => Assert.Equal(new SymbolKindOrTypeKind(TypeKind.Interface), symbolKind),
Options\EditorConfigNamingStyleParserTests.cs (4)
337[InlineData("interface", new object[] { TypeKind.Interface })] 338[InlineData("*", new object[] { SymbolKind.Namespace, TypeKind.Class, TypeKind.Struct, TypeKind.Interface, TypeKind.Enum, SymbolKind.Property, MethodKind.Ordinary, MethodKind.LocalFunction, SymbolKind.Field, SymbolKind.Event, TypeKind.Delegate, SymbolKind.Parameter, SymbolKind.TypeParameter, SymbolKind.Local })] 339[InlineData(null, new object[] { SymbolKind.Namespace, TypeKind.Class, TypeKind.Struct, TypeKind.Interface, TypeKind.Enum, SymbolKind.Property, MethodKind.Ordinary, MethodKind.LocalFunction, SymbolKind.Field, SymbolKind.Event, TypeKind.Delegate, SymbolKind.Parameter, SymbolKind.TypeParameter, SymbolKind.Local })] 448var expectedApplicableTypeKindList = new[] { new SymbolKindOrTypeKind(TypeKind.Interface) };
Microsoft.Gen.Logging (2)
Parsing\Parser.LogProperties.cs (1)
20private static readonly HashSet<TypeKind> _allowedTypeKinds = [TypeKind.Class, TypeKind.Struct, TypeKind.Interface];
Parsing\Parser.TagProvider.cs (1)
161if (target.TypeKind == TypeKind.Interface)
Microsoft.Interop.ComInterfaceGenerator (2)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
52if (type is not { TypeKind: TypeKind.Interface, IsComImport: true }
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (1)
32if (typeSymbol.TypeKind != TypeKind.Interface)
Microsoft.VisualStudio.LanguageServices (10)
CommonControls\MemberSelectionViewModel.cs (1)
143var isInterface = destinationType == TypeKind.Interface;
ExtractInterface\ExtractInterfaceDialogViewModel.cs (1)
40destinationTypeKind: TypeKind.Interface,
GenerateType\GenerateTypeDialogViewModel.cs (1)
205PopulateTypeKind(TypeKind.Interface, "interface", "Interface");
Library\ObjectBrowser\AbstractListItemFactory.cs (2)
216if (namedTypeSymbol.TypeKind != TypeKind.Interface) 268if (typeSymbol.TypeKind == TypeKind.Interface)
Library\ObjectBrowser\ObjectList.cs (2)
198case TypeKind.Interface: 445if (typeSymbol.TypeKind == TypeKind.Interface && typeSymbol.Interfaces.IsEmpty)
MoveStaticMembers\VisualStudioMoveStaticMembersOptionsService.cs (3)
187if (destinationType.TypeKind is not (TypeKind.Class or TypeKind.Interface or TypeKind.Module or TypeKind.Struct)) 191if (sourceType.TypeKind != TypeKind.Interface && destinationType.TypeKind == TypeKind.Interface)
Microsoft.VisualStudio.LanguageServices.CSharp (7)
CodeModel\CSharpCodeModelService.cs (4)
755TypeKind.Interface or 3715return typeSymbol.TypeKind == TypeKind.Interface; 3808return typeSymbol.TypeKind == TypeKind.Interface; 3822typeSymbol.TypeKind != TypeKind.Interface)
ObjectBrowser\DescriptionBuilder.cs (3)
76case TypeKind.Interface: 171typeSymbol.TypeKind != TypeKind.Interface) 238if (memberSymbol.ContainingType != null && memberSymbol.ContainingType.TypeKind == TypeKind.Interface)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
GlyphExtensionsTests.cs (1)
131typeKind: TypeKind.Interface);
Microsoft.VisualStudio.LanguageServices.Implementation (8)
CodeModel\AbstractCodeModelService.cs (2)
229case TypeKind.Interface: 550case TypeKind.Interface:
CodeModel\Collections\BasesCollection.cs (2)
77if (symbol.TypeKind == TypeKind.Interface || _interfaces) 139if (symbol.TypeKind == TypeKind.Interface || _interfaces)
CodeModel\ExternalElements\AbstractExternalCodeType.cs (1)
60if (typeSymbol.TypeKind == TypeKind.Interface)
CodeModel\FileCodeModel_CodeGen.cs (1)
355TypeKind.Interface,
Options\Style\NamingPreferences\SymbolSpecification\SymbolSpecificationViewModel.cs (2)
53new SymbolKindViewModel(TypeKind.Interface, ServicesVSResources.NamingSpecification_CSharp_Interface, specification), 95new SymbolKindViewModel(TypeKind.Interface, ServicesVSResources.NamingSpecification_VisualBasic_Interface, specification),
Roslyn.Diagnostics.Analyzers (23)
DefaultableTypeShouldHaveDefaultableFieldsAnalyzer.cs (1)
115case TypeKind.Interface:
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
135case TypeKind.Interface:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (3)
49if (type.TypeKind == TypeKind.Interface) 56case TypeKind.Interface: 71if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
106private static readonly SymbolKindOrTypeKind s_interface = new(TypeKind.Interface); 335case TypeKind.Interface:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
64new SymbolKindOrTypeKind(TypeKind.Interface),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
124member.ContainingType is { TypeKind: TypeKind.Interface } interfaceBeingImplemented)
Roslyn.Diagnostics.Analyzers.UnitTests (4)
CreateTestAccessorTests.cs (4)
149[InlineData(TypeKind.Interface)] 156TypeKind.Interface => "public interface $$SomeType { }", 236[InlineData(TypeKind.Interface)] 244TypeKind.Interface => "Interface $$SomeType\r\nEnd Interface",
Roslyn.Diagnostics.CSharp.Analyzers (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
212if (containingType != null && containingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
1084if (!original.IsReferenceType || original.TypeKind == TypeKind.Interface) 1408if (originalMemberSymbol.ContainingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
298if (constraintType.IsReferenceType && constraintType.TypeKind != TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
212namedType.TypeKind == TypeKind.Interface ? SyntaxKind.InterfaceDeclaration : SyntaxKind.ClassDeclaration;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (2)
60typeParameter.ConstraintTypes.Where(t => t.TypeKind == TypeKind.Interface).Concat( 61typeParameter.ConstraintTypes.Where(t => t.TypeKind is not TypeKind.Class and not TypeKind.Interface)));
System.Text.Json.SourceGeneration (4)
Helpers\RoslynExtensions.cs (4)
106if (type.IsAbstract || type.TypeKind is TypeKind.Interface || type is not INamedTypeSymbol namedType) 132if (baseType.TypeKind is TypeKind.Interface) 160if (baseType.TypeKind is TypeKind.Interface) 236if (type.TypeKind != TypeKind.Interface)
Test.Utilities (20)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (3)
49if (type.TypeKind == TypeKind.Interface) 56case TypeKind.Interface: 71if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
106private static readonly SymbolKindOrTypeKind s_interface = new(TypeKind.Interface); 335case TypeKind.Interface:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
64new SymbolKindOrTypeKind(TypeKind.Interface),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
Text.Analyzers (23)
IdentifiersShouldBeSpelledCorrectly.cs (1)
341if (type.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
135case TypeKind.Interface:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (3)
49if (type.TypeKind == TypeKind.Interface) 56case TypeKind.Interface: 71if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
106private static readonly SymbolKindOrTypeKind s_interface = new(TypeKind.Interface); 335case TypeKind.Interface:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
64new SymbolKindOrTypeKind(TypeKind.Interface),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (6)
90if (member.ContainingType.TypeKind == TypeKind.Interface) 161if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 199if (type.TypeKind == TypeKind.Interface) 302if (type.TypeKind == TypeKind.Interface) 350if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 367return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (2)
187if (symbol is { ContainingType.TypeKind: TypeKind.Interface }) 232=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
46return type is INamedTypeSymbol { TypeKind: TypeKind.Interface } namedType && !allInterfaces.Contains(namedType) 81=> symbol?.TypeKind == TypeKind.Interface; 184IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SignatureComparer.cs (2)
186property1.ContainingType.TypeKind == TypeKind.Interface) 196property2.ContainingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
124member.ContainingType is { TypeKind: TypeKind.Interface } interfaceBeingImplemented)