875 references to Class
GenerateDocumentationAndConfigFiles (16)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
48case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (6)
42if (containingType.TypeKind == TypeKind.Class) 143if (containingType.TypeKind == TypeKind.Class) 195if (containingType.TypeKind == TypeKind.Class) 242if (containingType.TypeKind == TypeKind.Class) 290if (containingType.TypeKind == TypeKind.Class) 355if (containingType.TypeKind == TypeKind.Class)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
104private static readonly SymbolKindOrTypeKind s_class = new(TypeKind.Class); 329case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
66if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
62new SymbolKindOrTypeKind(TypeKind.Class),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,
ILLink.RoslynAnalyzer (2)
RequiresAnalyzerBase.cs (1)
207if (typeSymbol.TypeKind != TypeKind.Class || typeSymbol.BaseType == null)
TrimAnalysis\SingleValueExtensions.cs (1)
26TypeKind.Class or TypeKind.Enum or TypeKind.Interface or TypeKind.Struct =>
Metrics (17)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
48case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (6)
42if (containingType.TypeKind == TypeKind.Class) 143if (containingType.TypeKind == TypeKind.Class) 195if (containingType.TypeKind == TypeKind.Class) 242if (containingType.TypeKind == TypeKind.Class) 290if (containingType.TypeKind == TypeKind.Class) 355if (containingType.TypeKind == TypeKind.Class)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
104private static readonly SymbolKindOrTypeKind s_class = new(TypeKind.Class); 329case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
66if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
62new SymbolKindOrTypeKind(TypeKind.Class),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,
Metrics.Legacy (17)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
48case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (6)
42if (containingType.TypeKind == TypeKind.Class) 143if (containingType.TypeKind == TypeKind.Class) 195if (containingType.TypeKind == TypeKind.Class) 242if (containingType.TypeKind == TypeKind.Class) 290if (containingType.TypeKind == TypeKind.Class) 355if (containingType.TypeKind == TypeKind.Class)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
104private static readonly SymbolKindOrTypeKind s_class = new(TypeKind.Class); 329case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
66if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
62new SymbolKindOrTypeKind(TypeKind.Class),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,
Microsoft.AspNetCore.App.Analyzers (1)
src\Shared\Roslyn\MvcFacts.cs (1)
17if (type.TypeKind != TypeKind.Class)
Microsoft.AspNetCore.App.SourceGenerators (1)
PublicTopLevelProgramGenerator.cs (1)
32TypeKind: TypeKind.Class,
Microsoft.AspNetCore.Mvc.Analyzers (2)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (1)
77return type.TypeKind == TypeKind.Class &&
src\Shared\Roslyn\MvcFacts.cs (1)
17if (type.TypeKind != TypeKind.Class)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
src\Shared\Roslyn\MvcFacts.cs (1)
17if (type.TypeKind != TypeKind.Class)
Microsoft.AspNetCore.OpenApi.SourceGenerators (3)
Helpers\ISymbolExtensions.cs (1)
171return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
XmlCommentGenerator.Parser.cs (1)
127symbol is not INamedTypeSymbol { TypeKind: TypeKind.Class, IsStatic: true })
XmlComments\XmlComment.InheritDoc.cs (1)
297if (typeSymbol.TypeKind == TypeKind.Class)
Microsoft.CodeAnalysis.Analyzers (19)
MetaAnalyzers\ClassIsNotDiagnosticAnalyzer.cs (1)
51if (namedType.TypeKind == TypeKind.Class &&
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (1)
297operation.Type.TypeKind == TypeKind.Class &&
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
48case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (6)
42if (containingType.TypeKind == TypeKind.Class) 143if (containingType.TypeKind == TypeKind.Class) 195if (containingType.TypeKind == TypeKind.Class) 242if (containingType.TypeKind == TypeKind.Class) 290if (containingType.TypeKind == TypeKind.Class) 355if (containingType.TypeKind == TypeKind.Class)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
104private static readonly SymbolKindOrTypeKind s_class = new(TypeKind.Class); 329case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
66if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
62new SymbolKindOrTypeKind(TypeKind.Class),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,
Microsoft.CodeAnalysis.AnalyzerUtilities (11)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
48case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
104private static readonly SymbolKindOrTypeKind s_class = new(TypeKind.Class); 329case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
66if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
62new SymbolKindOrTypeKind(TypeKind.Class),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,
Microsoft.CodeAnalysis.BannedApiAnalyzers (11)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
48case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
104private static readonly SymbolKindOrTypeKind s_class = new(TypeKind.Class); 329case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
66if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
62new SymbolKindOrTypeKind(TypeKind.Class),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,
Microsoft.CodeAnalysis.CodeStyle (10)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
177if (namedType.TypeKind is not TypeKind.Class and not TypeKind.Struct and not TypeKind.Module)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
104private static readonly SymbolKindOrTypeKind s_class = new(TypeKind.Class); 329case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
66if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
62new SymbolKindOrTypeKind(TypeKind.Class),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
400return TypeToGenerateIn?.TypeKind is (TypeKind?)TypeKind.Class or (TypeKind?)TypeKind.Struct;
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (1)
26TypeKind.Class,
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.AbstractInvocationInfo.cs (2)
59var classTypes = constraints.Where(ts => ts.TypeKind == TypeKind.Class).ToList(); 60var nonClassTypes = constraints.Where(ts => ts.TypeKind != TypeKind.Class).ToList();
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
226if (state.ClassOrStructType.TypeKind != TypeKind.Class)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
271var condition1 = typeParameter.ConstraintTypes.Count(t => t.TypeKind == TypeKind.Class) >= 2;
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
40type.TypeKind == TypeKind.Class && type.IsSealed && !type.IsStatic)
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (1)
src\Features\DiagnosticsTestUtilities\NamingStyles\NamingStylesTestOptionSets.cs (1)
135[new SymbolSpecification.SymbolKindOrTypeKind(TypeKind.Class)],
Microsoft.CodeAnalysis.CSharp (101)
Binder\Binder_Constraints.cs (2)
505type.TypeKind == TypeKind.Class) 597case TypeKind.Class:
Binder\Binder_Conversions.cs (2)
782case TypeKind.Class when !type.IsAnonymousType: // We don't want to enable object creation with unspeakable types 791case TypeKind.Class:
Binder\Binder_Crefs.cs (1)
775case TypeKind.Class:
Binder\Binder_Expressions.cs (6)
5216case TypeKind.Class: 5234goto case TypeKind.Class; 5244goto case TypeKind.Class; 5560Debug.Assert(type.TypeKind is TypeKind.Class or TypeKind.Struct); 6969Debug.Assert(coClassType.TypeKind == TypeKind.Class || coClassType.TypeKind == TypeKind.Error); 9635case TypeKind.Class:
Binder\Binder_Lookup.cs (2)
265case TypeKind.Class: 1945case TypeKind.Class:
Binder\ForEachLoopBinder.cs (1)
1653case TypeKind.Class:
Binder\Semantics\Conversions\ConversionsBase.cs (1)
2650case TypeKind.Class:
Binder\Semantics\Operators\OperatorFacts.cs (1)
22case TypeKind.Class:
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (6)
2261if (target.TypeKind != TypeKind.Class) 2280if (source.TypeKind == TypeKind.Class) 2323case TypeKind.Class: 2658if (source.TypeKind != TypeKind.Class || target.TypeKind != TypeKind.Class) 2700case TypeKind.Class:
Compilation\CSharpCompilation.cs (1)
1985if (mainType is null || mainType.IsGenericType || (mainType.TypeKind != TypeKind.Class && mainType.TypeKind != TypeKind.Struct && !mainType.IsInterface))
Compiler\ClsComplianceChecker.cs (1)
1000case TypeKind.Class:
Compiler\MethodCompiler.cs (1)
643containingType is { IsImplicitlyDeclared: false, TypeKind: TypeKind.Class or TypeKind.Struct or TypeKind.Interface } &&
FlowAnalysis\DefiniteAssignment.cs (1)
2645case TypeKind.Class:
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (2)
563LocalSymbol thisTemp = (F.CurrentType.TypeKind == TypeKind.Class) ? F.SynthesizedLocal(F.CurrentType) : null; 624LocalSymbol thisTemp = (F.CurrentType.TypeKind == TypeKind.Class) ? F.SynthesizedLocal(F.CurrentType) : null;
Lowering\AsyncRewriter\AsyncRewriter.cs (4)
74var typeKind = (compilationState.Compilation.Options.EnableEditAndContinue || method.IsIterator) ? TypeKind.Class : TypeKind.Struct; 172if (F.CurrentType.TypeKind == TypeKind.Class) 195if (stateMachineType.TypeKind == TypeKind.Class) 204if (frameType.TypeKind == TypeKind.Class)
Lowering\ClosureConversion\SynthesizedClosureEnvironment.cs (1)
56TypeKind = isStruct ? TypeKind.Struct : TypeKind.Class;
Lowering\IteratorRewriter\IteratorStateMachine.cs (1)
48get { return TypeKind.Class; }
Lowering\LocalRewriter\DelegateCacheContainer.cs (1)
50public override TypeKind TypeKind => TypeKind.Class;
Lowering\LocalRewriter\DynamicSiteContainer.cs (1)
42get { return TypeKind.Class; }
SymbolDisplay\SymbolDisplayVisitor.Types.cs (4)
644case TypeKind.Class when symbol.IsRecord: 650case TypeKind.Class: 744case TypeKind.Class when symbol.IsRecord: 766case TypeKind.Class:
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.TypePublicSymbol.cs (1)
80get { return TypeKind.Class; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (1)
103get { return TypeKind.Class; }
Symbols\AssemblySymbol.cs (3)
507=> GetSpecialType(InternalSpecialType.System_Runtime_CompilerServices_AsyncHelpers) is { TypeKind: TypeKind.Class, IsStatic: true }; 514return GetSpecialType(SpecialType.System_Runtime_CompilerServices_RuntimeFeature) is { TypeKind: TypeKind.Class, IsStatic: true } && 537GetSpecialType(SpecialType.System_Runtime_CompilerServices_PreserveBaseOverridesAttribute) is { TypeKind: TypeKind.Class };
Symbols\Compilation_WellKnownMembers.cs (1)
223if (type.Kind != SymbolKind.NamedType || type.TypeKind != TypeKind.Class)
Symbols\ConstraintsHelper.cs (4)
220case TypeKind.Class: 1492case TypeKind.Class: 1517Debug.Assert(type.TypeKind is TypeKind.Class or TypeKind.Struct); 1568case TypeKind.Class:
Symbols\EnumConversions.cs (1)
21return TypeKind.Class;
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
95case TypeKind.Class:
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1313if ((this.ContainingType.TypeKind == TypeKind.Class && this.IsRuntimeFinalizer(skipFirstMethodKindCheck: true)) ||
Symbols\Metadata\PE\PENamedTypeSymbol.cs (7)
1984case TypeKind.Class: 2034result = TypeKind.Class; 2186bool checkForExtensionGroup = this.IsStatic && this.ContainingType is null && this.TypeKind == TypeKind.Class && 2209type.TypeKind == TypeKind.Class && type.BaseTypeNoUseSiteDiagnostics.IsObjectType() && 2230marker.TypeKind == TypeKind.Class && marker.BaseTypeNoUseSiteDiagnostics.IsObjectType() && marker.Arity == 0 && 2514else if (TypeKind == TypeKind.Class && SpecialType != SpecialType.System_Enum) 2771var coClassType = ((object)type != null && (type.TypeKind == TypeKind.Class || type.IsErrorType())) ? (NamedTypeSymbol)type : null;
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
193case TypeKind.Class:
Symbols\Source\SourceEventSymbol.cs (1)
674else if (IsAbstract && !ContainingType.IsAbstract && (ContainingType.TypeKind == TypeKind.Class || ContainingType.TypeKind == TypeKind.Submission))
Symbols\Source\SourceMemberContainerSymbol.cs (7)
262Debug.Assert(typeKind is TypeKind.Struct or TypeKind.Class || !HasPrimaryConstructor); 327case TypeKind.Class: 1405case TypeKind.Class: 3561case TypeKind.Class: 3822if (TypeKind is TypeKind.Class) 3831case TypeKind.Class: 3837if (TypeKind == TypeKind.Class) // Tracked by https://github.com/dotnet/roslyn/issues/78827 : MQ, Consider tightening this check to only top-level non-generic static classes, however optimizing for error scenarios is usually not a goal.
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
518case TypeKind.Class:
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1483if (ContainingSymbol is NamedTypeSymbol { IsComImport: true, TypeKind: TypeKind.Class or TypeKind.Interface })
Symbols\Source\SourceNamedTypeSymbol.cs (5)
825case TypeKind.Class: 1242return builderType is NamedTypeSymbol { TypeKind: TypeKind.Class or TypeKind.Struct, IsGenericType: false }; 1349if ((object)coClassType != null && coClassType.TypeKind == TypeKind.Class) 1611if (this.TypeKind == TypeKind.Class) 1985|| TypeKind != TypeKind.Class
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (6)
469if (i == 0 && TypeKind == TypeKind.Class) // allow class in the first position 520if ((baseType.TypeKind == TypeKind.Class || 583case TypeKind.Class: 584if (TypeKind == TypeKind.Class) 633(TypeKind != TypeKind.Class || baseType.TypeKind == TypeKind.Interface || ((TypeDeclarationSyntax)decl.SyntaxReference.GetSyntax()).ParameterList is null)) 733case TypeKind.Class:
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
918else if (IsAbstract && !ContainingType.IsAbstract && (ContainingType.TypeKind == TypeKind.Class || ContainingType.TypeKind == TypeKind.Submission))
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
530if (IsAbstract && !ContainingType.IsAbstract && (ContainingType.TypeKind == TypeKind.Class || ContainingType.TypeKind == TypeKind.Submission))
Symbols\Symbol_Attributes.cs (1)
70case TypeKind.Class:
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (1)
139public override TypeKind TypeKind => TypeKind.Class;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
816public override TypeKind TypeKind => TypeKind.Class;
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
75public override TypeKind TypeKind => TypeKind.Class;
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (1)
92public override TypeKind TypeKind => TypeKind.Class;
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
84Debug.Assert(_containingType.TypeKind == TypeKind.Class);
Symbols\Synthesized\SynthesizedPrivateImplementationDetailsType.cs (1)
57public override TypeKind TypeKind => TypeKind.Class;
Symbols\TypeSymbolExtensions.cs (6)
336return type.TypeKind == TypeKind.Class; 421case TypeKind.Class: 702case TypeKind.Class: 777case TypeKind.Class: 851case TypeKind.Class: 1515case TypeKind.Class:
Symbols\VarianceSafety.cs (2)
75case TypeKind.Class: 373case TypeKind.Class:
Utilities\TypeSymbolExtensions.cs (2)
186case TypeKind.Class: 278case TypeKind.Class:
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
274if (namedType.TypeKind is not (TypeKind.Class or TypeKind.Struct))
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
78if (namedType is not { TypeKind: TypeKind.Class or TypeKind.Struct })
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
42if (typeSymbol.TypeKind is TypeKind.Class or TypeKind.Struct)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (11)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (4)
44TypeKind: TypeKind.Class or TypeKind.Struct, 272recordKeyword = type.TypeKind == TypeKind.Class 417type.TypeKind == TypeKind.Class 423type.TypeKind == TypeKind.Class
src\Analyzers\CSharp\CodeFixes\GenerateDefaultConstructors\CSharpGenerateDefaultConstructorsService.cs (1)
39return classType?.TypeKind is TypeKind.Class or TypeKind.Struct;
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
392semanticModel.GetSymbolInfo(baseType.Type, cancellationToken).GetAnySymbol() is INamedTypeSymbol { TypeKind: TypeKind.Class })
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (3)
200var isRecordClass = namedType.TypeKind is TypeKind.Class; 293if (namedType.TypeKind == TypeKind.Class) 321if (namedType.TypeKind == TypeKind.Class && namedType.BaseType != null && namedType.BaseType.SpecialType != Microsoft.CodeAnalysis.SpecialType.System_Object)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (2)
59typeParameter.ConstraintTypes.Where(t => t.TypeKind == TypeKind.Class).Concat( 61typeParameter.ConstraintTypes.Where(t => t.TypeKind is not TypeKind.Class and not TypeKind.Interface)));
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (3)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (3)
223[InlineData("class [|c2|] { }", "class C2 { }", TypeKind.Class, Accessibility.Private)] 245var alternateSymbolKind = TypeKind.Class.Equals(symbolKind) ? TypeKind.Interface : TypeKind.Class;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (26)
CodeActions\GenerateType\GenerateTypeTests_Dialog.cs (25)
1565typeKind: TypeKind.Class, 1613typeKind: TypeKind.Class, 1653typeKind: TypeKind.Class, 1702typeKind: TypeKind.Class, 1743typeKind: TypeKind.Class, 1790typeKind: TypeKind.Class, 1829typeKind: TypeKind.Class, 1871typeKind: TypeKind.Class, 1920typeKind: TypeKind.Class, 1966typeKind: TypeKind.Class, 2019typeKind: TypeKind.Class, 2169typeKind: TypeKind.Class, 2208typeKind: TypeKind.Class, 2248typeKind: TypeKind.Class, 2288typeKind: TypeKind.Class, 2327typeKind: TypeKind.Class, 2359typeKind: TypeKind.Class, 2442typeKind: TypeKind.Class, 3305typeKind: TypeKind.Class, 3344typeKind: TypeKind.Class, 3383typeKind: TypeKind.Class, 3428typeKind: TypeKind.Class, 3479typeKind: TypeKind.Class, 3749typeKind: TypeKind.Class, 3784typeKind: TypeKind.Class,
Workspaces\WorkspaceTests_EditorFeatures.cs (1)
529Assert.Equal(TypeKind.Class, classCz.TypeKind);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenAsyncTests.cs (1)
104Assert.Equal(TypeKind.Class, stateMachine.TypeKind);
CodeGen\CodeGenTupleTest.cs (1)
23928Assert.Equal(TypeKind.Class, compilation.GetWellKnownType(WellKnownType.System_ValueTuple_T2).TypeKind);
Emit\EmitMetadataTests.cs (2)
321Assert.Equal(TypeKind.Class, classA.TypeKind); 322Assert.Equal(TypeKind.Class, classB.TypeKind);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (7)
Semantics\OutVarTests.cs (2)
33263Assert.Equal(TypeKind.Class, model.GetTypeInfo(declaration2).Type.TypeKind); 33270Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind);
Semantics\PrimaryConstructorTests.cs (4)
827case TypeKind.Class: 866case TypeKind.Class: 902case TypeKind.Class: 934case TypeKind.Class:
Semantics\RecordTests.cs (1)
119Assert.Equal(TypeKind.Class, point.TypeKind);
Microsoft.CodeAnalysis.CSharp.Features (13)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
342if (type.TypeKind is TypeKind.Struct or TypeKind.Class)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.ItemGetter.cs (1)
108if (containingType is not INamedTypeSymbol { TypeKind: TypeKind.Class or TypeKind.Struct or TypeKind.Interface })
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (1)
213if (within is { TypeKind: TypeKind.Struct or TypeKind.Class })
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1966TypeKind.Class => symbol.IsRecord ? CSharpFeaturesResources.record_ : FeaturesResources.class_,
SignatureHelp\ConstructorInitializerSignatureHelpProvider.cs (1)
80if (within.TypeKind is not TypeKind.Struct and not TypeKind.Class)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
274if (namedType.TypeKind is not (TypeKind.Class or TypeKind.Struct))
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
78if (namedType is not { TypeKind: TypeKind.Class or TypeKind.Struct })
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (4)
44TypeKind: TypeKind.Class or TypeKind.Struct, 272recordKeyword = type.TypeKind == TypeKind.Class 417type.TypeKind == TypeKind.Class 423type.TypeKind == TypeKind.Class
src\Analyzers\CSharp\CodeFixes\GenerateDefaultConstructors\CSharpGenerateDefaultConstructorsService.cs (1)
39return classType?.TypeKind is TypeKind.Class or TypeKind.Struct;
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
392semanticModel.GetSymbolInfo(baseType.Type, cancellationToken).GetAnySymbol() is INamedTypeSymbol { TypeKind: TypeKind.Class })
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (3)
223[InlineData("class [|c2|] { }", "class C2 { }", TypeKind.Class, Accessibility.Private)] 245var alternateSymbolKind = TypeKind.Class.Equals(symbolKind) ? TypeKind.Interface : TypeKind.Class;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (44)
Semantics\InteractiveSemanticModelTests.cs (4)
158Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 160Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 209Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 211Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind);
Semantics\LambdaTests.cs (12)
2124Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2169Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2215Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2261Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2307Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2364Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2419Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2465Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2511Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2544Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2577Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2614Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind);
Semantics\NullableReferenceTypesTests.cs (13)
3339Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 116686Assert.Equal(TypeKind.Class, compilation1.GetTypeByMetadataName("C").TypeKind); 116706Assert.Equal(TypeKind.Class, compilation2.GetTypeByMetadataName("C").TypeKind); 116717Assert.Equal(TypeKind.Class, compilation3.GetTypeByMetadataName("C").TypeKind); 116740Assert.Equal(TypeKind.Class, a.TypeKind); 116742Assert.Equal(TypeKind.Class, b.TypeKind); 116744Assert.Equal(TypeKind.Class, c.TypeKind); 116746Assert.Equal(TypeKind.Class, d.TypeKind); 116808Assert.Equal(TypeKind.Class, a.TypeKind); 116810Assert.Equal(TypeKind.Class, b.TypeKind); 116812Assert.Equal(TypeKind.Class, c.TypeKind); 116814Assert.Equal(TypeKind.Class, d.TypeKind); 116826Assert.Equal(TypeKind.Class, compilation7.GetTypeByMetadataName("C").TypeKind);
Semantics\ScriptSemanticsTests.cs (2)
454Assert.Equal(TypeKind.Class, members[0].TypeKind); 459Assert.Equal(TypeKind.Class, members[0].TypeKind);
Semantics\UseSiteErrorTests.cs (13)
2311Assert.Equal(TypeKind.Class, compilation1.GetTypeByMetadataName("C").TypeKind); 2329Assert.Equal(TypeKind.Class, compilation2.GetTypeByMetadataName("C").TypeKind); 2340Assert.Equal(TypeKind.Class, compilation3.GetTypeByMetadataName("C").TypeKind); 2363Assert.Equal(TypeKind.Class, a.TypeKind); 2365Assert.Equal(TypeKind.Class, b.TypeKind); 2367Assert.Equal(TypeKind.Class, c.TypeKind); 2369Assert.Equal(TypeKind.Class, d.TypeKind); 2385Assert.Equal(TypeKind.Class, compilation5.GetTypeByMetadataName("C").TypeKind); 2408Assert.Equal(TypeKind.Class, a.TypeKind); 2410Assert.Equal(TypeKind.Class, b.TypeKind); 2412Assert.Equal(TypeKind.Class, c.TypeKind); 2414Assert.Equal(TypeKind.Class, d.TypeKind); 2426Assert.Equal(TypeKind.Class, compilation7.GetTypeByMetadataName("C").TypeKind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (261)
Compilation\GetSemanticInfoTests.cs (2)
4685Assert.Equal(TypeKind.Class, paramType1.TypeKind); 4730Assert.Equal(TypeKind.Class, paramType1.TypeKind);
Compilation\SemanticModelAPITests.cs (3)
4597Assert.Equal(TypeKind.Class, type.TypeKind); 4613Assert.Equal(TypeKind.Class, type.TupleElements[0].Type.TypeKind); 4614Assert.Equal(TypeKind.Class, type.TupleElements[1].Type.TypeKind);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
1012Assert.Equal(TypeKind.Class, symbol.TypeKind);
Compilation\SemanticModelGetSemanticInfoTests.cs (188)
85Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 87Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 116Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 118Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 150Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 152Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 191Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 193Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 232Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 234Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 461Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 463Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 724Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 726Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 760Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 762Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1642Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 1644Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1749Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1897Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 1899Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1926Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 1928Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1956Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 1958Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2117Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2119Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2262Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2264Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2297Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2299Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2575Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2577Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2648Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2650Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2981Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2983Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3071Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3073Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3116Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3118Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3426Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3588Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3590Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3626Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3628Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3670Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3672Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3704Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3706Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3738Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3740Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3772Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3774Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3863Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3865Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3898Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3900Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3937Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4006Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4008Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4068Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4070Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4245Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4247Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4442Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4444Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4473Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4475Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4850Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4852Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4963Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4965Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5015Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5017Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5105Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5107Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5152Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5154Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5198Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5200Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5277Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5279Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5319Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5321Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5693Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5727Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5729Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6328Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6330Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6518Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6520Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6553Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6555Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6590Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6592Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6674Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6676Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6874Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6876Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 7105Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 7107Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 7136Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 7138Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 7697Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 7699Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 7728Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8368Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 8370Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8402Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 8404Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8559Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 8561Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8604Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 8606Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8769Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9063Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9122Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9124Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9455Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9457Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9668Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9670Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9719Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9721Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9830Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9832Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9916Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9918Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9950Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9952Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9986Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9988Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10022Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10024Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10058Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10060Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10102Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10104Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10139Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10141Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10176Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10178Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10215Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10217Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10246Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10248Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10281Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10283Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10493Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10522Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10797Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10799Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10834Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10836Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 11143Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 11145Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 11221Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 11223Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12185Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 12187Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12257Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12323Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12425Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 12427Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12485Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12675Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 12677Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13036Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13038Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13128Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13130Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13162Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13164Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13196Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13198Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13322Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13324Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13872Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13874Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13911Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13913Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13950Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13952Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 15151Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 15153Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 15404Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 15406Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind);
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
1025Assert.Equal(TypeKind.Class, classDisposable.TypeKind);
Symbols\AssemblyAndNamespaceTests.cs (2)
382Assert.Equal(TypeKind.Class, objectType.TypeKind); 434Assert.Equal(TypeKind.Class, taskType.TypeKind);
Symbols\CompilationCreationTests.cs (7)
2460Assert.Equal(TypeKind.Class, type3.TypeKind); 2622Assert.False(HasSingleTypeOfKind(c, TypeKind.Class, "System.Linq.Enumerable")); 2624Assert.True(HasSingleTypeOfKind(c, TypeKind.Class, "System.Linq.Enumerable")); 2625Assert.False(HasSingleTypeOfKind(c, TypeKind.Class, "System.Uri")); 2627Assert.False(HasSingleTypeOfKind(c, TypeKind.Class, "System.Linq.Enumerable")); 2628Assert.True(HasSingleTypeOfKind(c, TypeKind.Class, "System.Uri")); 2630Assert.False(HasSingleTypeOfKind(c, TypeKind.Class, "System.Uri"));
Symbols\Metadata\MetadataTypeTests.cs (2)
89Assert.Equal(TypeKind.Class, class1.TypeKind); 139Assert.Equal(TypeKind.Class, type1.TypeKind);
Symbols\Metadata\PE\LoadingEvents.cs (6)
201Assert.Equal(TypeKind.Class, @class.TypeKind); 228Assert.Equal(TypeKind.Class, @class.TypeKind); 260Assert.Equal(TypeKind.Class, @class.TypeKind); 300Assert.Equal(TypeKind.Class, @class.TypeKind); 338Assert.Equal(TypeKind.Class, outerClass.TypeKind); 364Assert.Equal(TypeKind.Class, innerClass.TypeKind);
Symbols\Metadata\PE\LoadingMethods.cs (13)
394Assert.Equal(TypeKind.Class, @class.TypeKind); 423Assert.Equal(TypeKind.Class, @class.TypeKind); 455Assert.Equal(TypeKind.Class, @class.TypeKind); 491Assert.Equal(TypeKind.Class, @class.TypeKind); 525Assert.Equal(TypeKind.Class, @class.TypeKind); 548Assert.Equal(TypeKind.Class, @class.TypeKind); 585Assert.Equal(TypeKind.Class, @class.TypeKind); 612Assert.Equal(TypeKind.Class, baseClass.TypeKind); 615Assert.Equal(TypeKind.Class, derivedClass.TypeKind); 640Assert.Equal(TypeKind.Class, @class.TypeKind); 673Assert.Equal(TypeKind.Class, @class.TypeKind); 710Assert.Equal(TypeKind.Class, outerClass.TypeKind); 736Assert.Equal(TypeKind.Class, innerClass.TypeKind);
Symbols\Metadata\PE\LoadingProperties.cs (7)
35Assert.Equal(TypeKind.Class, @class.TypeKind); 62Assert.Equal(TypeKind.Class, @class.TypeKind); 94Assert.Equal(TypeKind.Class, @class.TypeKind); 134Assert.Equal(TypeKind.Class, @class.TypeKind); 172Assert.Equal(TypeKind.Class, outerClass.TypeKind); 198Assert.Equal(TypeKind.Class, innerClass.TypeKind); 252Assert.Equal(TypeKind.Class, @class.TypeKind);
Symbols\Metadata\PE\TypeKindTests.cs (2)
40Assert.Equal(TypeKind.Class, obj.TypeKind); 46Assert.Equal(TypeKind.Class, @enum.TypeKind);
Symbols\MissingSpecialMember.cs (6)
163Assert.Equal(TypeKind.Class, lookupType.TypeKind); 272Assert.Equal(TypeKind.Class, wellKnownType.TypeKind); 276Assert.Equal(TypeKind.Class, lookupType.TypeKind); 382Assert.Equal(TypeKind.Class, wellKnownType.TypeKind); 385Assert.Equal(TypeKind.Class, lookupType.TypeKind); 499Assert.Equal(TypeKind.Class, wellKnown.TypeKind);
Symbols\MockNamedTypeSymbol.cs (1)
174public MockNamedTypeSymbol(string name, IEnumerable<Symbol> children, TypeKind kind = TypeKind.Class)
Symbols\MockSymbolTests.cs (2)
69NamedTypeSymbol container = new MockNamedTypeSymbol("TestClass", Enumerable.Empty<Symbol>(), TypeKind.Class); 117result = new MockNamedTypeSymbol(name, childSymbols, TypeKind.Class);
Symbols\Source\BaseClassTests.cs (1)
1899Assert.Equal(TypeKind.Class, derived.TypeKind);
Symbols\Source\FieldTests.cs (3)
65Assert.Equal(TypeKind.Class, sym.Type.TypeKind); 92Assert.Equal(TypeKind.Class, f.Type.TypeKind); 209Assert.Equal(TypeKind.Class, sym.Type.TypeKind);
Symbols\Source\MethodTests.cs (5)
368Assert.Equal(TypeKind.Class, refP.TypeKind); 1673Assert.Equal(TypeKind.Class, @class.TypeKind); 1717Assert.Equal(TypeKind.Class, @class.TypeKind); 1763Assert.Equal(TypeKind.Class, @class.TypeKind); 1813Assert.Equal(TypeKind.Class, @class.TypeKind);
Symbols\Source\PropertyTests.cs (4)
1756Assert.Equal(TypeKind.Class, @class.TypeKind); 1790Assert.Equal(TypeKind.Class, @class.TypeKind); 1828Assert.Equal(TypeKind.Class, @class.TypeKind); 1958Assert.Equal(TypeKind.Class, @class.TypeKind);
Symbols\SymbolErrorTests.cs (1)
19440Assert.Equal(TypeKind.Class, Base.TypeKind);
Symbols\TypeTests.cs (4)
308Assert.Equal(TypeKind.Class, type4.TypeKind); 869Assert.Equal(TypeKind.Class, classA.TypeKind); 908Assert.Equal(TypeKind.Class, varA.Type.TypeKind); 1311Assert.Equal(TypeKind.Class, baseType.TypeKind);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\ReadOnlyStructs.cs (1)
122Assert.Equal(TypeKind.Class, s1.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)
170case TypeKind.Class: 185case TypeKind.Class:
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
42if (typeSymbol.TypeKind is TypeKind.Class or TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (3)
200var isRecordClass = namedType.TypeKind is TypeKind.Class; 293if (namedType.TypeKind == TypeKind.Class) 321if (namedType.TypeKind == TypeKind.Class && namedType.BaseType != null && namedType.BaseType.SpecialType != Microsoft.CodeAnalysis.SpecialType.System_Object)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (2)
59typeParameter.ConstraintTypes.Where(t => t.TypeKind == TypeKind.Class).Concat( 61typeParameter.ConstraintTypes.Where(t => t.TypeKind is not TypeKind.Class and not TypeKind.Interface)));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Diagnostics\GenerateType\TestGenerateTypeOptionsService.cs (2)
22public TypeKind TypeKind = TypeKind.Class; 74TypeKind typeKind = TypeKind.Class,
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\AbstractCodeGenerationTests.cs (1)
125attributes: default, accessibility: default, modifiers: default, TypeKind.Class, name);
CodeGeneration\CodeGenerationTests.cs (1)
508TypeKind typeKind = TypeKind.Class,
Microsoft.CodeAnalysis.Extensions.Package (5)
Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,
Microsoft.CodeAnalysis.Features (30)
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (1)
106=> typeSymbol.TypeKind is TypeKind.Class or TypeKind.Struct;
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (1)
87if (enclosingSymbol.TypeKind is not (TypeKind.Struct or TypeKind.Class))
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer_Constraints.cs (1)
34=> CheckConstraints(receiverTypeSymbol, typeParameter, TypeKind.Class, static type => type.GetBaseTypesAndThis());
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
317isRecord, TypeKind.Class, className, capturedTypeParameters, members: members);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (5)
331TypeKind.Class => FeaturesResources.class_, 5089if (record.TypeKind == TypeKind.Class) 5389if (type.TypeKind != TypeKind.Class) 5699if (!isStatic && oldType.TypeKind == TypeKind.Class && newType.TypeKind == TypeKind.Class)
ExtractClass\ExtractClassWithDialogCodeAction.cs (1)
86TypeKind.Class,
FindUsages\AbstractFindUsagesService_FindImplementations.cs (1)
198else if (symbol is INamedTypeSymbol { TypeKind: TypeKind.Class } namedType)
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.cs (1)
212if (containingType?.TypeKind is not TypeKind.Class and not TypeKind.Struct)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
90if (containingType?.TypeKind is not TypeKind.Class and not TypeKind.Struct)
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (1)
317: TypeKind.Class;
GenerateType\AbstractGenerateTypeService.State.cs (2)
240if (baseType.TypeKind is not TypeKind.Class and not TypeKind.Interface) 288if (TypeToGenerateInOpt.TypeKind is not TypeKind.Class and
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)
328Debug.Assert(memberSymbol.TypeKind is TypeKind.Class or TypeKind.Struct);
PullMemberUp\MemberAndDestinationValidator.cs (1)
17if (destination.TypeKind is not TypeKind.Interface and not TypeKind.Class)
PullMemberUp\MembersPuller.cs (1)
68TypeKind.Class or TypeKind.Module => PullMembersIntoClassAsync(document, pullMembersUpOptions, cancellationToken),
Shared\Extensions\ISymbolExtensions_2.cs (1)
61case TypeKind.Class:
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
177if (namedType.TypeKind is not TypeKind.Class and not TypeKind.Struct and not TypeKind.Module)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
400return TypeToGenerateIn?.TypeKind is (TypeKind?)TypeKind.Class or (TypeKind?)TypeKind.Struct;
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (1)
26TypeKind.Class,
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.AbstractInvocationInfo.cs (2)
59var classTypes = constraints.Where(ts => ts.TypeKind == TypeKind.Class).ToList(); 60var nonClassTypes = constraints.Where(ts => ts.TypeKind != TypeKind.Class).ToList();
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
226if (state.ClassOrStructType.TypeKind != TypeKind.Class)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
271var condition1 = typeParameter.ConstraintTypes.Count(t => t.TypeKind == TypeKind.Class) >= 2;
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
40type.TypeKind == TypeKind.Class && type.IsSealed && !type.IsStatic)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (11)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
48case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
104private static readonly SymbolKindOrTypeKind s_class = new(TypeKind.Class); 329case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
66if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
62new SymbolKindOrTypeKind(TypeKind.Class),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,
Microsoft.CodeAnalysis.PublicApiAnalyzers (13)
DeclarePublicApiAnalyzer.Impl.cs (2)
185if (namedType is { TypeKind: TypeKind.Class, InstanceConstructors.Length: 1 } or { TypeKind: TypeKind.Struct }) 314method.ContainingType.TypeKind == TypeKind.Class &&
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
48case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
104private static readonly SymbolKindOrTypeKind s_class = new(TypeKind.Class); 329case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
66if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
62new SymbolKindOrTypeKind(TypeKind.Class),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (6)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (6)
42if (containingType.TypeKind == TypeKind.Class) 143if (containingType.TypeKind == TypeKind.Class) 195if (containingType.TypeKind == TypeKind.Class) 242if (containingType.TypeKind == TypeKind.Class) 290if (containingType.TypeKind == TypeKind.Class) 355if (containingType.TypeKind == TypeKind.Class)
Microsoft.CodeAnalysis.ResxSourceGenerator (11)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
48case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
104private static readonly SymbolKindOrTypeKind s_class = new(TypeKind.Class); 329case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
66if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
62new SymbolKindOrTypeKind(TypeKind.Class),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,
Microsoft.CodeAnalysis.Test.Utilities (4)
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (4)
205if (derivedType.TypeKind == TypeKind.Class || derivedType.TypeKind == TypeKind.Structure) 226return baseType.TypeKind == TypeKind.Class && baseType.SpecialType == SpecialType.System_Object; 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 (75)
Binding\Binder_Expressions.vb (5)
1070type.TypeKind <> TYPEKIND.Class Then 1210Case TYPEKIND.Class 2821If leftTypeKind = TYPEKIND.Class OrElse leftTypeKind = TYPEKIND.Structure OrElse leftTypeKind = TYPEKIND.Module Then 3802Case TYPEKIND.Class 3837Case TYPEKIND.Class
Binding\Binder_Lookup.vb (5)
580Case TypeKind.Class, TypeKind.Module, TypeKind.Structure, TypeKind.Delegate, TypeKind.Array, TypeKind.Enum 606Case TypeKind.Class, TypeKind.Structure, TypeKind.Delegate, TypeKind.Array, TypeKind.Enum 931Case TypeKind.Class, TypeKind.Module, TypeKind.Structure 1092Case TypeKind.Class, TypeKind.Module, TypeKind.Structure 1964(container.TypeKind = TypeKind.Class OrElse container.TypeKind = TypeKind.Structure) AndAlso
Binding\Binder_ObjectInitializer.vb (2)
211Case TypeKind.Class 239Case TypeKind.Class,
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)
737Case TypeKind.Class
Compilation\MethodCompiler.vb (1)
866If sourceTypeSymbol.TypeKind = TypeKind.Class AndAlso sourceTypeSymbol.GetAttributes().IndexOfAttribute(AttributeDescription.DesignerGeneratedAttribute) > -1 Then
Compilation\VisualBasicCompilation.vb (1)
1544If mainType Is Nothing OrElse (mainType.TypeKind <> TYPEKIND.Class AndAlso mainType.TypeKind <> TYPEKIND.Structure AndAlso mainType.TypeKind <> TYPEKIND.Module) Then
Emit\NoPia\EmbeddedTypesManager.vb (1)
256Debug.Assert(type.TypeKind = TypeKind.Class OrElse type.TypeKind = TypeKind.Module)
Lowering\AsyncRewriter\AsyncRewriter.vb (4)
91Dim kind = If(compilationState.Compilation.Options.EnableEditAndContinue, TypeKind.Class, TypeKind.Struct) 141If frameType.TypeKind = TypeKind.Class Then 185If Me.F.CurrentType.TypeKind = TypeKind.Class Then 200If StateMachineType.TypeKind = TypeKind.Class Then
Lowering\IteratorRewriter\IteratorStateMachine.vb (1)
64Return TypeKind.Class
Lowering\LambdaRewriter\LambdaFrame.vb (1)
216Return TypeKind.Class
Semantics\Conversions.vb (4)
1996(src.TypeKind <> TypeKind.Class OrElse DirectCast(src, NamedTypeSymbol).IsNotInheritable) AndAlso 2018(dst.TypeKind <> TypeKind.Class OrElse DirectCast(dst, NamedTypeSymbol).IsNotInheritable) AndAlso 2452If Not base.IsErrorType() AndAlso base.TypeKind = TypeKind.Class AndAlso 2865Case TypeKind.Class,
Semantics\TypeInference\TypeArgumentInference.vb (2)
1781If fixedTypeTypeKind <> TypeKind.Class AndAlso fixedTypeTypeKind <> TypeKind.Interface Then 1805If fixedTypeTypeKind = TypeKind.Class Then
SymbolDisplay\SymbolDisplayVisitor.Types.vb (3)
254Case TypeKind.Class, 325Case TypeKind.Class 454Case TypeKind.Class
Symbols\AnonymousTypes\AnonymousType_SymbolCollection.vb (1)
94Case TypeKind.Class
Symbols\AnonymousTypes\AnonymousTypeManager_Templates.vb (1)
188Case TypeKind.Class
Symbols\AnonymousTypes\PublicSymbols\AnonymousType_TypePublicSymbol.vb (1)
149Return TypeKind.Class
Symbols\AnonymousTypes\PublicSymbols\AnonymousTypeOrDelegatePublicSymbol.vb (1)
21Debug.Assert((TypeKind = TypeKind.Class AndAlso TypeOf Me Is AnonymousTypePublicSymbol) OrElse
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_TemplateSymbol.vb (1)
136Return TypeKind.Class
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousTypeOrDelegateTemplateSymbol.vb (1)
54Debug.Assert(TypeKind = TypeKind.Class OrElse TypeKind = TypeKind.Delegate)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousTypeOrDelegateTypeParameterSymbol.vb (1)
72Debug.Assert(_container.TypeKind = TypeKind.Class)
Symbols\BaseTypeAnalysis.vb (2)
124If this.TypeKind = TypeKind.Class Then 233If currentNamedType.TypeKind = TypeKind.Class Then
Symbols\ConstraintsHelper.vb (4)
162Case TypeKind.Class 958If typeArgument.TypeKind = TypeKind.Class OrElse isStructure Then 1166Debug.Assert(type.TypeKind = TypeKind.Class OrElse type.TypeKind = TypeKind.Structure) 1168Dim sourceClass = If(type.TypeKind = TypeKind.Class, TryCast(type, SourceNamedTypeSymbol), Nothing)
Symbols\EmbeddedSymbols\EmbeddedSymbolManager.SymbolsCollection.vb (1)
333Debug.Assert(type.TypeKind = TypeKind.Module OrElse type.TypeKind = TypeKind.Class AndAlso type.IsNotInheritable)
Symbols\Metadata\PE\PENamedTypeSymbol.vb (2)
1022result = TypeKind.Class 1330If (typeKind = TypeKind.Class OrElse typeKind = TypeKind.Module) AndAlso
Symbols\Source\OverrideHidingHelper.vb (1)
27Case TypeKind.Class, TypeKind.Interface, TypeKind.Structure
Symbols\Source\SourceMemberContainerTypeSymbol.vb (5)
35[Class] = CUShort(TypeKind.Class) << TypeKindShift 344Case TypeKind.Class, TypeKind.Enum, TypeKind.Structure 2738ElseIf TypeKind = TypeKind.Class OrElse 2807ElseIf TypeKind = TypeKind.Class OrElse TypeKind = TypeKind.Module Then 3503If myTypeKind = TypeKind.Class OrElse myTypeKind = TypeKind.Interface OrElse myTypeKind = TypeKind.Structure OrElse myTypeKind = TypeKind.Module Then
Symbols\Source\SourceMemberMethodSymbol.vb (1)
761Case TypeKind.Class, TypeKind.Module
Symbols\Source\SourceNamedTypeSymbol.vb (5)
1125Case TypeKind.Class 1385Case TypeKind.Class 1721TypeKind <> TypeKind.Class OrElse 2237Case TypeKind.Class 2691If Me.TypeKind = TypeKind.Class AndAlso Not Me.IsGenericType Then
Symbols\Source\SourceNamedTypeSymbol_GroupClass.vb (6)
17If Me.TypeKind = TypeKind.Class AndAlso Not Me.IsGenericType Then 216If named.TypeKind = TypeKind.Class AndAlso Not named.IsNotInheritable Then 250named.TypeKind = TypeKind.Class AndAlso 292Debug.Assert(candidate.TypeKind = TypeKind.Class) 302If Me.TypeKind = TypeKind.Class Then 315Debug.Assert(Me.TypeKind = TypeKind.Class)
Symbols\Symbol_Attributes.vb (1)
98Case TypeKind.Class,
Symbols\SymbolExtensions.vb (1)
35Case TypeKind.Class
Symbols\SynthesizedSymbols\SynthesizedHotReloadExceptionSymbol.vb (1)
274Return TypeKind.Class
Symbols\TypeSymbolExtensions.vb (5)
140Return type.TypeKind = TypeKind.Class 414Case TypeKind.Error, TypeKind.Class, TypeKind.Submission 830Case TypeKind.Class, 863Case TypeKind.Class, 1060If type.TypeKind = TypeKind.Class Then
Microsoft.CodeAnalysis.Workspaces (17)
Classification\ClassificationExtensions.cs (1)
12TypeKind.Class => type.IsRecord ? ClassificationTypeNames.RecordClassName : ClassificationTypeNames.ClassName,
Editing\SyntaxGenerator.cs (2)
769TypeKind.Class => ClassDeclaration( 897case TypeKind.Class:
FindSymbols\FindReferences\DependentTypeFinder.cs (1)
47private static readonly Func<INamedTypeSymbol, bool> s_isNonSealedClass = static t => t is { TypeKind: TypeKind.Class, IsSealed: false };
FindSymbols\FindReferences\DependentTypeFinder_ImplementingTypes.cs (1)
54t => t.TypeKind is TypeKind.Class or
FindSymbols\SymbolFinder_Hierarchy.cs (1)
129if (symbol is { DeclaredAccessibility: Accessibility.Public, ContainingType.TypeKind: TypeKind.Class or TypeKind.Struct })
Recommendations\AbstractRecommendationServiceRunner.cs (1)
490else if (originalConstraintType.TypeKind == TypeKind.Class)
Shared\Extensions\ISymbolExtensions.cs (1)
489if (typeSymbol.TypeKind == TypeKind.Class)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
104private static readonly SymbolKindOrTypeKind s_class = new(TypeKind.Class); 329case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
66if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
62new SymbolKindOrTypeKind(TypeKind.Class),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Options\OptionsTestHelpers.cs (1)
153=> CreateNamingStylePreferences(([TypeKind.Class], Capitalization.PascalCase, ReportDiagnostic.Error));
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
EditorConfigParsing\NamingStyleParserTests.cs (1)
157symbolKind => Assert.Equal(new SymbolKindOrTypeKind(TypeKind.Class), symbolKind),
Options\EditorConfigNamingStyleParserTests.cs (2)
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 })]
Microsoft.Gen.Logging (1)
Parsing\Parser.LogProperties.cs (1)
20private static readonly HashSet<TypeKind> _allowedTypeKinds = [TypeKind.Class, TypeKind.Struct, TypeKind.Interface];
Microsoft.Gen.Logging.Unit.Tests (1)
LogParserUtilitiesTests.cs (1)
155paramTypeMock.SetupGet(x => x.TypeKind).Returns(TypeKind.Class);
Microsoft.Gen.MetadataExtractor (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
625if (strongTypeSymbol.TypeKind == TypeKind.Class) 756if (kind == TypeKind.Class)
Microsoft.Gen.Metrics (2)
Parser.cs (2)
625if (strongTypeSymbol.TypeKind == TypeKind.Class) 756if (kind == TypeKind.Class)
Microsoft.Gen.MetricsReports (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
625if (strongTypeSymbol.TypeKind == TypeKind.Class) 756if (kind == TypeKind.Class)
Microsoft.Interop.ComInterfaceGenerator (1)
Analyzers\AddGeneratedComClassAnalyzer.cs (1)
42if (type.TypeKind != TypeKind.Class)
Microsoft.Interop.SourceGeneration (3)
CustomMarshallingInfoHelper.cs (2)
29if (!(entryPointType.IsStatic && entryPointType.TypeKind == TypeKind.Class) 145if (!(entryPointType.IsStatic && entryPointType.TypeKind == TypeKind.Class)
ManualTypeMarshallingHelper.cs (1)
412if (marshallerType is { IsStatic: true, TypeKind: TypeKind.Class })
Microsoft.ML.InternalCodeAnalyzer (1)
BaseTestClassAnalyzer.cs (1)
68if (namedType.TypeKind != TypeKind.Class)
Microsoft.VisualStudio.LanguageServices (6)
CommonControls\MemberSelectionViewModel.cs (1)
29TypeKind destinationTypeKind = TypeKind.Class,
ExtractClass\ExtractClassViewModel.cs (1)
42destinationTypeKind: TypeKind.Class);
GenerateType\GenerateTypeDialogViewModel.cs (1)
190PopulateTypeKind(TypeKind.Class, "class", "Class");
Implementation\ContainedLanguageRefactorNotifyService.cs (1)
77else if (symbol is INamedTypeSymbol && (symbol as INamedTypeSymbol).TypeKind == TypeKind.Class)
Library\ObjectBrowser\ObjectList.cs (1)
214case TypeKind.Class:
MoveStaticMembers\VisualStudioMoveStaticMembersOptionsService.cs (1)
187if (destinationType.TypeKind is not (TypeKind.Class or TypeKind.Interface or TypeKind.Module or TypeKind.Struct))
Microsoft.VisualStudio.LanguageServices.CSharp (3)
CodeModel\CSharpCodeModelService.cs (2)
754if (typeSymbol.TypeKind is TypeKind.Class or 3711return typeSymbol.TypeKind == TypeKind.Class;
ObjectBrowser\DescriptionBuilder.cs (1)
80case TypeKind.Class:
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (4)
GlyphExtensionsTests.cs (4)
71pointedAtType: (INamedTypeSymbol)CreateSymbolMock(SymbolKind.NamedType, typeKind: TypeKind.Class)); 100elementType: (INamedTypeSymbol)CreateSymbolMock(SymbolKind.NamedType, typeKind: TypeKind.Class)); 105target: (INamedTypeSymbol)CreateSymbolMock(SymbolKind.NamedType, typeKind: TypeKind.Class)); 115typeKind: TypeKind.Class);
Microsoft.VisualStudio.LanguageServices.Implementation (5)
CodeModel\AbstractCodeModelService.cs (2)
222case TypeKind.Class: 547case TypeKind.Class:
CodeModel\FileCodeModel_CodeGen.cs (1)
209TypeKind.Class,
Options\Style\NamingPreferences\SymbolSpecification\SymbolSpecificationViewModel.cs (2)
51new SymbolKindViewModel(TypeKind.Class, ServicesVSResources.NamingSpecification_CSharp_Class, specification), 93new SymbolKindViewModel(TypeKind.Class, ServicesVSResources.NamingSpecification_VisualBasic_Class, specification),
Roslyn.Diagnostics.Analyzers (20)
AbstractCreateTestAccessor`1.cs (1)
56=> typeSymbol.TypeKind is TypeKind.Class or TypeKind.Struct;
AbstractExposeMemberForTesting`1.cs (1)
92=> typeSymbol.TypeKind is TypeKind.Class or TypeKind.Struct;
DefaultableTypeShouldHaveDefaultableFieldsAnalyzer.cs (1)
114case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
48case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (6)
42if (containingType.TypeKind == TypeKind.Class) 143if (containingType.TypeKind == TypeKind.Class) 195if (containingType.TypeKind == TypeKind.Class) 242if (containingType.TypeKind == TypeKind.Class) 290if (containingType.TypeKind == TypeKind.Class) 355if (containingType.TypeKind == TypeKind.Class)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
104private static readonly SymbolKindOrTypeKind s_class = new(TypeKind.Class); 329case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
66if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
62new SymbolKindOrTypeKind(TypeKind.Class),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,
Roslyn.Diagnostics.CSharp.Analyzers (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
42if (typeSymbol.TypeKind is TypeKind.Class or TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (3)
200var isRecordClass = namedType.TypeKind is TypeKind.Class; 293if (namedType.TypeKind == TypeKind.Class) 321if (namedType.TypeKind == TypeKind.Class && namedType.BaseType != null && namedType.BaseType.SpecialType != Microsoft.CodeAnalysis.SpecialType.System_Object)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (2)
59typeParameter.ConstraintTypes.Where(t => t.TypeKind == TypeKind.Class).Concat( 61typeParameter.ConstraintTypes.Where(t => t.TypeKind is not TypeKind.Class and not TypeKind.Interface)));
Test.Utilities (16)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
48case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (6)
42if (containingType.TypeKind == TypeKind.Class) 143if (containingType.TypeKind == TypeKind.Class) 195if (containingType.TypeKind == TypeKind.Class) 242if (containingType.TypeKind == TypeKind.Class) 290if (containingType.TypeKind == TypeKind.Class) 355if (containingType.TypeKind == TypeKind.Class)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
104private static readonly SymbolKindOrTypeKind s_class = new(TypeKind.Class); 329case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
66if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
62new SymbolKindOrTypeKind(TypeKind.Class),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,
Text.Analyzers (17)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
48case TypeKind.Class:
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (6)
42if (containingType.TypeKind == TypeKind.Class) 143if (containingType.TypeKind == TypeKind.Class) 195if (containingType.TypeKind == TypeKind.Class) 242if (containingType.TypeKind == TypeKind.Class) 290if (containingType.TypeKind == TypeKind.Class) 355if (containingType.TypeKind == TypeKind.Class)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
104private static readonly SymbolKindOrTypeKind s_class = new(TypeKind.Class); 329case TypeKind.Class:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
66if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
62new SymbolKindOrTypeKind(TypeKind.Class),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (2)
340if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 544TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
181return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
52=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
261TypeKind.Module => TypeKind.Class,