3 implementations of TypeKind
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\TypeSymbol.cs (1)
140TypeKind ITypeSymbol.TypeKind
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
67public TypeKind TypeKind => _symbol.TypeKind;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeSymbol.vb (1)
581Private ReadOnly Property ITypeSymbol_TypeKind As TypeKind Implements ITypeSymbol.TypeKind, ITypeSymbolInternal.TypeKind
1595 references to TypeKind
ConfigurationSchemaGenerator (5)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (4)
69type.TypeKind is TypeKind.TypeParameter or TypeKind.Pointer or TypeKind.Error || 192else if (type.TypeKind is TypeKind.Array) 602if (!(typeSymbol.IsAbstract || typeSymbol.TypeKind is TypeKind.Interface)) 841if (typeArg.TypeKind is TypeKind.TypeParameter or TypeKind.Error ||
RuntimeSource\SourceGenerators\TypeRef.cs (1)
21TypeKind = type.TypeKind;
ILLink.RoslynAnalyzer (5)
ISymbolExtensions.cs (1)
183 return typeSymbol.TypeKind == TypeKind.Interface;
TrimAnalysis\HandleCallAction.cs (1)
106 } else if (staticType.IsSealed || staticType.IsTypeOf ("System", "Delegate") || staticType.TypeKind == TypeKind.Array) {
TrimAnalysis\SingleValueExtensions.cs (1)
18 return underlyingType?.TypeKind switch {
TrimAnalysis\TrimAnalysisVisitor.cs (2)
188 (operation.Type?.TypeKind == TypeKind.Enum || operation.Type?.SpecialType == SpecialType.System_Int32)) { 440 } else if (operation.Type?.TypeKind == TypeKind.Enum && constantValue is int enumConstantValue) {
Metrics (19)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134switch (namedType.TypeKind)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
690=> methodSymbol.Parameters.Any(p => p.Type.TypeKind == TypeKind.Delegate);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
140if (symbol.TypeKind != TypeKind.Class)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
103if (operation.Type.TypeKind == TypeKind.Enum)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (3)
94typeSymbol.TypeKind == TypeKind.Error; 397if (type1.TypeKind == TypeKind.TypeParameter && 398type2.TypeKind == TypeKind.TypeParameter &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (5)
53switch (possibleBase.TypeKind) 56if (type.TypeKind == TypeKind.Interface) 99if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface) 114if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter) 352if (invocationTarget.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
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)
Metrics.Legacy (19)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134switch (namedType.TypeKind)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
690=> methodSymbol.Parameters.Any(p => p.Type.TypeKind == TypeKind.Delegate);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
140if (symbol.TypeKind != TypeKind.Class)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
103if (operation.Type.TypeKind == TypeKind.Enum)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (3)
94typeSymbol.TypeKind == TypeKind.Error; 397if (type1.TypeKind == TypeKind.TypeParameter && 398type2.TypeKind == TypeKind.TypeParameter &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (5)
53switch (possibleBase.TypeKind) 56if (type.TypeKind == TypeKind.Interface) 99if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface) 114if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter) 352if (invocationTarget.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
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.Analyzers.Extra (3)
CallAnalysis\Arrays.cs (2)
108if (keyType.TypeKind == TypeKind.Enum 112if (keyType.TypeKind == TypeKind.Enum)
CallAnalysis\CallAnalyzer.Handlers.cs (1)
42if (type.TypeKind == TypeKind.Interface)
Microsoft.Analyzers.Local (2)
ApiLifecycle\AssemblyAnalysis.cs (1)
195if (type.TypeKind != TypeKind.Delegate)
CallAnalysis\CallAnalyzer.Handlers.cs (1)
42if (type.TypeKind == TypeKind.Interface)
Microsoft.AspNetCore.App.Analyzers (3)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
107if (source.TypeKind == TypeKind.Interface)
src\Shared\Roslyn\MvcFacts.cs (1)
17if (type.TypeKind != TypeKind.Class)
src\Shared\RoslynUtils\ParsabilityHelper.cs (1)
26if (typeSymbol.TypeKind == TypeKind.Enum)
Microsoft.AspNetCore.App.SourceGenerators (1)
PublicTopLevelProgramGenerator.cs (1)
31TypeKind: TypeKind.Class,
Microsoft.AspNetCore.Http.RequestDelegateGenerator (3)
src\Shared\RoslynUtils\ParsabilityHelper.cs (1)
26if (typeSymbol.TypeKind == TypeKind.Enum)
StaticRouteHandlerModel\Emitters\EndpointParameterEmitter.cs (1)
340var receiverType = endpointParameter.BindableMethodSymbol?.ReceiverType is { TypeKind: TypeKind.Interface } targetType
StaticRouteHandlerModel\EndpointParameter.cs (1)
312if (type.TypeKind == TypeKind.Array)
Microsoft.AspNetCore.Mvc.Analyzers (6)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (2)
26if (typeCache.PageModelAttribute == null || typeCache.PageModelAttribute.TypeKind == TypeKind.Error) 77return type.TypeKind == TypeKind.Class &&
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
107if (source.TypeKind == TypeKind.Interface)
src\Shared\Roslyn\MvcFacts.cs (1)
17if (type.TypeKind != TypeKind.Class)
TagHelpersInCodeBlocksAnalyzer.cs (1)
175return typeSymbol != null && typeSymbol.TypeKind != TypeKind.Error;
TopLevelParameterNameAnalyzer.cs (1)
301return typeSymbol != null && typeSymbol.TypeKind != TypeKind.Error;
Microsoft.AspNetCore.Mvc.Api.Analyzers (4)
ApiControllerFacts.cs (1)
18if (method.ReturnsVoid || method.ReturnType.TypeKind == TypeKind.Error)
ApiControllerSymbolCache.cs (1)
129return typeSymbol != null && typeSymbol.TypeKind != TypeKind.Error;
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
107if (source.TypeKind == TypeKind.Interface)
src\Shared\Roslyn\MvcFacts.cs (1)
17if (type.TypeKind != TypeKind.Class)
Microsoft.AspNetCore.OpenApi.SourceGenerators (4)
Helpers\ISymbolExtensions.cs (1)
171return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } &&
XmlCommentGenerator.Parser.cs (1)
100symbol is not INamedTypeSymbol { TypeKind: TypeKind.Class, IsStatic: true })
XmlComments\XmlComment.InheritDoc.cs (2)
297if (typeSymbol.TypeKind == TypeKind.Class) 303else if (typeSymbol.TypeKind == TypeKind.Interface)
Microsoft.CodeAnalysis (5)
Compilation\Compilation.cs (2)
3686return string.Format("{0}: {1} {2} -> {3} {4}", this.AssemblyName, source.TypeKind.ToString(), source.Name, destination.TypeKind.ToString(), destination.Name);
Compilation\Expression.cs (1)
41if (type.TypeKind == TypeKind.Enum)
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (2)
142if (type.TypeKind == TypeKind.Enum) 185if (typeSymbol.TypeKind != TypeKind.Enum)
Microsoft.CodeAnalysis.Analyzers (26)
MetaAnalyzers\ClassIsNotDiagnosticAnalyzer.cs (1)
51if (namedType.TypeKind == TypeKind.Class &&
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (1)
297operation.Type.TypeKind == TypeKind.Class &&
MetaAnalyzers\DiagnosticAnalyzerAPIUsageAnalyzer.cs (1)
262usedType.TypeKind != TypeKind.Error)
MetaAnalyzers\RegisterActionAnalyzer.cs (2)
401typeArgument.TypeKind != TypeKind.TypeParameter && 402typeArgument.TypeKind != TypeKind.Error &&
src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (2)
317if (typeArgument.TypeKind != TypeKind.TypeParameter && 318typeArgument.TypeKind != TypeKind.Error &&
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134switch (namedType.TypeKind)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
690=> methodSymbol.Parameters.Any(p => p.Type.TypeKind == TypeKind.Delegate);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
140if (symbol.TypeKind != TypeKind.Class)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
103if (operation.Type.TypeKind == TypeKind.Enum)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (3)
94typeSymbol.TypeKind == TypeKind.Error; 397if (type1.TypeKind == TypeKind.TypeParameter && 398type2.TypeKind == TypeKind.TypeParameter &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (5)
53switch (possibleBase.TypeKind) 56if (type.TypeKind == TypeKind.Interface) 99if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface) 114if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter) 352if (invocationTarget.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
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.AnalyzerUtilities (18)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134switch (namedType.TypeKind)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
690=> methodSymbol.Parameters.Any(p => p.Type.TypeKind == TypeKind.Delegate);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
140if (symbol.TypeKind != TypeKind.Class)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
103if (operation.Type.TypeKind == TypeKind.Enum)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (3)
94typeSymbol.TypeKind == TypeKind.Error; 397if (type1.TypeKind == TypeKind.TypeParameter && 398type2.TypeKind == TypeKind.TypeParameter &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (5)
53switch (possibleBase.TypeKind) 56if (type.TypeKind == TypeKind.Interface) 99if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface) 114if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter) 352if (invocationTarget.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)
35Debug.Assert(CollectionNamedTypes.All(ct => ct.TypeKind == TypeKind.Interface));
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataSymbolMap.cs (1)
123if (namedTypeSymbol.TypeKind == TypeKind.Interface
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (3)
1347static bool IsInterfaceOrTypeParameter(ITypeSymbol? type) => type?.TypeKind is TypeKind.Interface or TypeKind.TypeParameter; 2402if (argument.Parameter?.Type.TypeKind == TypeKind.Delegate || 2409if (argument.Parameter.Type.TypeKind == TypeKind.Delegate)
Microsoft.CodeAnalysis.BannedApiAnalyzers (15)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134switch (namedType.TypeKind)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
690=> methodSymbol.Parameters.Any(p => p.Type.TypeKind == TypeKind.Delegate);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
140if (symbol.TypeKind != TypeKind.Class)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
103if (operation.Type.TypeKind == TypeKind.Enum)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (3)
94typeSymbol.TypeKind == TypeKind.Error; 397if (type1.TypeKind == TypeKind.TypeParameter && 398type2.TypeKind == TypeKind.TypeParameter &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (5)
53switch (possibleBase.TypeKind) 56if (type.TypeKind == TypeKind.Interface) 99if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface) 114if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter) 352if (invocationTarget.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
SymbolIsBannedAnalyzerBase.cs (2)
317if (typeArgument.TypeKind != TypeKind.TypeParameter && 318typeArgument.TypeKind != TypeKind.Error &&
Microsoft.CodeAnalysis.CodeStyle (50)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
88else if (typeWithoutNullable.TypeKind == TypeKind.Enum) 117if (type.RemoveNullableIfPresent()?.TypeKind != TypeKind.Enum)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (1)
27if (switchExpressionType?.TypeKind == TypeKind.Enum)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
68if (switchExpressionType?.TypeKind == TypeKind.Enum)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
183if (value.Type.TypeKind == TypeKind.Dynamic)
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\Extensions\INamedTypeSymbolExtensions.cs (8)
87if (member.ContainingType.TypeKind == TypeKind.Interface) 158if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 196if (type.TypeKind == TypeKind.Interface) 299if (type.TypeKind == TypeKind.Interface) 337if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 347if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 364return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface 541TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (8)
177return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } && 185symbol.ContainingType.TypeKind == TypeKind.Interface) 224=> symbol is ITypeSymbol { TypeKind: TypeKind.Error }; 227=> symbol is ITypeSymbol { TypeKind: TypeKind.Module }; 230=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface }; 281=> symbol is { ContainingType.TypeKind: TypeKind.Module }; 305=> symbol is ITypeSymbol { TypeKind: TypeKind.Delegate }; 693if (!methods.Any(x => x.Name == WellKnownMemberNames.OnCompleted && x.ReturnsVoid && x.Parameters is [{ Type.TypeKind: TypeKind.Delegate }]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
192typeArg.TypeKind != TypeKind.Error &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (13)
43if (type is INamedTypeSymbol namedType && namedType.TypeKind == TypeKind.Interface && !allInterfaces.Contains(namedType)) 57=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract; 83=> symbol?.TypeKind == TypeKind.Module; 86=> symbol?.TypeKind == TypeKind.Interface; 89=> symbol?.TypeKind == TypeKind.Delegate; 92=> symbol?.TypeKind == TypeKind.FunctionPointer; 95=> symbol?.TypeKind == TypeKind.Struct; 189IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes(); 264switch (typeSymbol.TypeKind) 542if (t1.TypeKind != t2.TypeKind) 636if (type != null && type.IsValueType && type.TypeKind == TypeKind.Enum) 688if (type.TypeKind != TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (2)
83symbol = updatedContainingType.GetTypeMembers(symbol.Name, symbol.Arity).First(m => m.TypeKind == symbol.TypeKind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
149if (type.TypeKind == TypeKind.Array && typeArguments.IsEmpty) 158type.TypeKind == TypeKind.Pointer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
410symbol.GetSymbolType()?.TypeKind != TypeKind.Delegate)
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)
367SymbolCategory.Type => symbol is ITypeSymbol type && type.TypeKind == (TypeKind)_kind,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
407if (namedTypeSymbol.TypeKind == TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TupleTypeSymbolKey.cs (1)
22var isError = symbol.TupleUnderlyingType!.TypeKind == TypeKind.Error;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (2)
185property1.ContainingType.TypeKind == TypeKind.Interface) 195property2.ContainingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.cs (1)
247=> x.TypeKind switch
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (1)
512if (x.TypeKind == TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
192if (x.TypeKind == TypeKind.Delegate)
Microsoft.CodeAnalysis.CodeStyle.Fixes (25)
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AddAccessibilityModifiersHelpers.cs (1)
50if (symbol.ContainingType?.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
406return TypeToGenerateIn?.TypeKind is (TypeKind?)TypeKind.Class or (TypeKind?)TypeKind.Struct;
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.State.cs (2)
58baseType.TypeKind == TypeKind.Error) 108if (classType.TypeKind == TypeKind.Struct)
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (2)
43if (!typeKinds.Contains(typeToGenerateIn.TypeKind)) 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)
45state.TypeToGenerateIn.TypeKind != TypeKind.Interface &&
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (2)
123return _state.TypeToGenerateIn.TypeKind != TypeKind.Interface && _refKind != RefKind.None 130if (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)
84if (this.TypeToGenerateIn.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
252if (idisposable?.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
277var 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)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (2)
185conversion.Type.TypeKind != TypeKind.Error) 189if (conversion.Operand.Type == null || conversion.Operand.Type.TypeKind != TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
38if (typeSymbol.TypeKind != TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
152if (namedType.TypeKind != TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
25namedType.TypeKind,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
130member.ContainingType is { TypeKind: TypeKind.Interface } interfaceBeingImplemented)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
498if (containingType?.TypeKind == TypeKind.Struct)
Microsoft.CodeAnalysis.CSharp (21)
SymbolDisplay\SymbolDisplayVisitor.cs (3)
312if (type != null && type.TypeKind != TypeKind.Error) 375(containingType.TypeKind != TypeKind.Interface && !IsEnumMember(symbol) & !IsLocalFunction(symbol)))) 467&& symbol.ContainingType.TypeKind == TypeKind.Enum
SymbolDisplay\SymbolDisplayVisitor.Members.cs (3)
70else if (symbol.ContainingType.TypeKind == TypeKind.Enum) 887if (type.TypeKind == TypeKind.Enum) 936(containingType.TypeKind != TypeKind.Interface && !IsEnumMember(symbol) && !IsLocalFunction(symbol))))
SymbolDisplay\SymbolDisplayVisitor.Types.cs (11)
224if (typeArg.TypeKind != TypeKind.Pointer) 279var shouldSkip = namespaceSymbol.IsGlobalNamespace && symbol.TypeKind == TypeKind.Error; 324if (symbol.IsAnonymousType && symbol.TypeKind != TypeKind.Delegate) 378if (symbolName is null && symbol.IsAnonymousType && symbol.TypeKind == TypeKind.Delegate) 539if (tupleSymbol.TypeKind == TypeKind.Error || 607if (symbol.TypeKind == TypeKind.Error && 626symbol.TypeKind == TypeKind.Delegate && 633switch (symbol.TypeKind) 654throw ExceptionUtilities.UnexpectedValue(symbol.TypeKind); 721if (symbol.IsAnonymousType && symbol.TypeKind != TypeKind.Delegate) 733switch (symbol.TypeKind)
SymbolDisplay\SymbolDisplayVisitor_Constants.cs (1)
18else if (type.IsReferenceType || type.TypeKind == TypeKind.Pointer || ITypeSymbolHelpers.IsNullableType(type))
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (1)
152if (symbol.TypeKind != TypeKind.Error)
Symbols\Source\SourceDelegateMethodSymbol.cs (2)
79if (binder.Compilation.GetSpecialType(SpecialType.System_IAsyncResult).TypeKind != TypeKind.Error && 80binder.Compilation.GetSpecialType(SpecialType.System_AsyncCallback).TypeKind != TypeKind.Error &&
Microsoft.CodeAnalysis.CSharp.CodeStyle (24)
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
90if (syntaxContext.SemanticModel.GetTypeInfo(invocationExpression.Expression, syntaxContext.CancellationToken).Type is { TypeKind: TypeKind.FunctionPointer })
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
56if (namedTypeSymbol.TypeKind != TypeKind.Struct)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (2)
59TypeKind: TypeKind.Struct, 258return instance is { Type.TypeKind: TypeKind.Struct } ||
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
82if (typeSymbol.TypeKind is not TypeKind.Struct)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
141if (invokedMethod.ContainingType.TypeKind == TypeKind.Struct && !invokedMethod.IsReadOnly && !invokedMethod.ContainingType.IsReadOnly)
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
115if (symbolInfo.GetAnySymbol() is not IFieldSymbol { ContainingType.TypeKind: TypeKind.Struct })
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
138if (operation?.Parent is IAssignmentOperation { Type.TypeKind: TypeKind.Dynamic }) 368if (!(namedType.TypeKind == TypeKind.Struct && noArgConstructor.IsImplicitlyDeclared))
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
128if (asType?.TypeKind == TypeKind.Dynamic)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
120if (isType?.TypeKind == TypeKind.Dynamic)
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)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
446if (parameter.Type.OriginalDefinition.TypeKind != TypeKind.TypeParameter)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (8)
252if (originalDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate) 269if (rewrittenDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate) 315if (originalConvertedType is null || originalConvertedType.TypeKind == TypeKind.Error) 356if (rewrittenConvertedType is null || rewrittenConvertedType.TypeKind == TypeKind.Error || !rewrittenConversion.Exists) 561originalConvertedType.IsReferenceType && rewrittenConvertedType.TypeKind == TypeKind.Dynamic) 987if (!original.IsReferenceType || original.TypeKind == TypeKind.Interface) 1311if (originalMemberSymbol.ContainingType.TypeKind == TypeKind.Interface) 1351rewrittenType.TypeKind == TypeKind.Array ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
276if (declaredType.TypeKind == TypeKind.Dynamic)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (33)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (4)
44TypeKind: TypeKind.Class or TypeKind.Struct, 268recordKeyword = type.TypeKind == TypeKind.Class 413type.TypeKind == TypeKind.Class 419type.TypeKind == TypeKind.Class
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\PositionalParameterInfo.cs (1)
179if (containingType.TypeKind == TypeKind.Struct && !containingType.IsReadOnly)
src\Analyzers\CSharp\CodeFixes\GenerateDefaultConstructors\CSharpGenerateDefaultConstructorsService.cs (1)
39return classType?.TypeKind is TypeKind.Class or TypeKind.Struct;
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
63if (interfaceSymbolInfo.GetAnySymbol() is INamedTypeSymbol interfaceType && interfaceType.TypeKind == TypeKind.Interface)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
85if (type != null && type.TypeKind != TypeKind.Error) 124return type.TypeKind == TypeKind.Enum &&
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
47if (type == null || type.TypeKind == TypeKind.Error || type.IsAnonymousType)
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\ExpressionGenerator.cs (1)
60if (type is INamedTypeSymbol { TypeKind: TypeKind.Enum } enumType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
298if (constraintType.IsReferenceType && constraintType.TypeKind != TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (8)
93if (info.Context.GenerateMembers && namedType.TypeKind != TypeKind.Delegate) 185if (namedType.TypeKind == TypeKind.Enum) 189else if (namedType.TypeKind == TypeKind.Delegate) 197var isRecordClass = namedType.TypeKind is TypeKind.Class; 208var kind = namedType.TypeKind == TypeKind.Struct ? SyntaxKind.StructDeclaration : 209namedType.TypeKind == TypeKind.Interface ? SyntaxKind.InterfaceDeclaration : SyntaxKind.ClassDeclaration; 290if (namedType.TypeKind == TypeKind.Class) 318if (namedType.TypeKind == TypeKind.Class && namedType.BaseType != null && namedType.BaseType.SpecialType != Microsoft.CodeAnalysis.SpecialType.System_Object)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
3059return ((INamedTypeSymbol)symbol).TypeKind == TypeKind.Enum; 3062return target.IsType && ((ITypeSymbol)target).TypeKind == TypeKind.Enum;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (3)
59typeParameter.ConstraintTypes.Where(t => t.TypeKind == TypeKind.Class).Concat( 60typeParameter.ConstraintTypes.Where(t => t.TypeKind == TypeKind.Interface).Concat( 61typeParameter.ConstraintTypes.Where(t => t.TypeKind is not TypeKind.Class and not TypeKind.Interface)));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.ExpressionSyntaxGeneratorVisitor.cs (2)
53if (symbol.ContainingType.TypeKind == TypeKind.Submission) 67if (symbol.TypeKind != TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (4)
195if (symbol.TypeKind == TypeKind.Error && symbol.Name == "var") 240if (innerType.TypeKind != TypeKind.Pointer) 275if (symbol.ContainingType.TypeKind != TypeKind.Submission) 294if (symbol.TypeKind != TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
442if (type.TypeKind == TypeKind.Delegate)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (8)
SymbolKey\SymbolKeyTestBase.cs (1)
408else if (tinfo.Type != null && tinfo.Type.TypeKind != TypeKind.Delegate)
Workspaces\WorkspaceTests_EditorFeatures.cs (7)
505Assert.NotEqual(TypeKind.Error, classC.TypeKind); 527Assert.Equal(TypeKind.Error, classCz.TypeKind); 529Assert.Equal(TypeKind.Class, classCz.TypeKind); 563Assert.NotEqual(TypeKind.Error, classCy.TypeKind); 635Assert.NotEqual(TypeKind.Error, classCy.TypeKind); 666if (classCz.TypeKind == TypeKind.Error) 687if (classCz.TypeKind == TypeKind.Error)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (15)
Semantics\ExtensionTests.cs (1)
51Assert.Equal(TypeKind.Extension, symbol.TypeKind);
Semantics\OutVarTests.cs (9)
19689Assert.True(compilation.GetSemanticModel(tree).GetTypeInfo(x1Ref).Type.TypeKind == TypeKind.Error); 19732Assert.True(compilation.GetSemanticModel(tree).GetTypeInfo(x1Ref).Type.TypeKind == TypeKind.Error); 20662Assert.True(compilation.GetSemanticModel(tree).GetTypeInfo(x4Ref).Type.TypeKind == TypeKind.Error); 20777Assert.True(model.GetTypeInfo(x1Ref).Type.TypeKind == TypeKind.Error); 20780Assert.True(model.GetTypeInfo(x2Ref).Type.TypeKind == TypeKind.Error); 20783Assert.True(model.GetTypeInfo(x3Ref).Type.TypeKind == TypeKind.Error); 20786Assert.True(model.GetTypeInfo(x4Ref).Type.TypeKind == TypeKind.Error); 33263Assert.Equal(TypeKind.Class, model.GetTypeInfo(declaration2).Type.TypeKind); 33270Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind);
Semantics\PatternMatchingTests2.cs (5)
2352Assert.Equal(TypeKind.Error, ti.Type.TypeKind); 2358Assert.Equal(TypeKind.Error, ti.Type.TypeKind); 2364Assert.Equal(TypeKind.Error, ti.Type.TypeKind); 2366Assert.Equal(TypeKind.Error, ti.ConvertedType.TypeKind); 2372Assert.Equal(TypeKind.Error, ti.ConvertedType.TypeKind);
Microsoft.CodeAnalysis.CSharp.Features (46)
ChangeSignature\CSharpChangeSignatureService.cs (1)
168if (typeSymbol != null && typeSymbol.IsKind(SymbolKind.NamedType) && ((ITypeSymbol)typeSymbol).TypeKind == TypeKind.Delegate)
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.NameGenerator.cs (2)
104if (type.TypeKind == TypeKind.Interface) 112if (type.TypeKind == TypeKind.TypeParameter)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (3)
129if (type.TypeKind != TypeKind.Enum) 184if (type.TypeKind == TypeKind.Enum) 349if (type.TypeKind is TypeKind.Struct or TypeKind.Class)
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 })
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (1)
174if (semanticModel.GetTypeInfo(objectCreationExpression, cancellationToken).Type is INamedTypeSymbol type && within != null && type.TypeKind != TypeKind.Delegate)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (5)
980return method.ContainingType.TypeKind != TypeKind.Struct; 984if (method.ContainingType.TypeKind == TypeKind.Struct) 1980=> symbol.TypeKind switch 2561{ ContainingType.TypeKind: TypeKind.Interface } 2566IFieldSymbol { ContainingType.TypeKind: TypeKind.Enum }
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
189semanticInfo.TypeKind is TypeKind.Error or TypeKind.Unknown)
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (1)
137info.ConvertedType.TypeKind != TypeKind.Interface)
NavigationBar\CSharpNavigationBarItemService.cs (1)
206return symbol.ContainingType.TypeKind == TypeKind.Enum
SignatureHelp\InvocationExpressionSignatureHelpProvider.cs (2)
81if (invokedType is INamedTypeSymbol { TypeKind: TypeKind.Delegate } or IFunctionPointerTypeSymbol) 129if (invokedType is INamedTypeSymbol { TypeKind: TypeKind.Delegate } expressionType)
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.cs (2)
77if (type.TypeKind == TypeKind.Delegate) 114Debug.Assert(type.TypeKind == TypeKind.Delegate);
Snippets\CSharpConsoleSnippetProvider.cs (1)
42if (lambdaSymbol is IMethodSymbol { ReturnType: { SpecialType: SpecialType.System_Void } or { TypeKind: TypeKind.Error } })
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
90if (syntaxContext.SemanticModel.GetTypeInfo(invocationExpression.Expression, syntaxContext.CancellationToken).Type is { TypeKind: TypeKind.FunctionPointer })
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
56if (namedTypeSymbol.TypeKind != TypeKind.Struct)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (2)
59TypeKind: TypeKind.Struct, 258return instance is { Type.TypeKind: TypeKind.Struct } ||
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
82if (typeSymbol.TypeKind is not TypeKind.Struct)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
141if (invokedMethod.ContainingType.TypeKind == TypeKind.Struct && !invokedMethod.IsReadOnly && !invokedMethod.ContainingType.IsReadOnly)
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
115if (symbolInfo.GetAnySymbol() is not IFieldSymbol { ContainingType.TypeKind: TypeKind.Struct })
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
138if (operation?.Parent is IAssignmentOperation { Type.TypeKind: TypeKind.Dynamic }) 368if (!(namedType.TypeKind == TypeKind.Struct && noArgConstructor.IsImplicitlyDeclared))
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
128if (asType?.TypeKind == TypeKind.Dynamic)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
120if (isType?.TypeKind == TypeKind.Dynamic)
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, 268recordKeyword = type.TypeKind == TypeKind.Class 413type.TypeKind == TypeKind.Class 419type.TypeKind == TypeKind.Class
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\PositionalParameterInfo.cs (1)
179if (containingType.TypeKind == TypeKind.Struct && !containingType.IsReadOnly)
src\Analyzers\CSharp\CodeFixes\GenerateDefaultConstructors\CSharpGenerateDefaultConstructorsService.cs (1)
39return classType?.TypeKind is TypeKind.Class or TypeKind.Struct;
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
63if (interfaceSymbolInfo.GetAnySymbol() is INamedTypeSymbol interfaceType && interfaceType.TypeKind == TypeKind.Interface)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
85if (type != null && type.TypeKind != TypeKind.Error) 124return type.TypeKind == TypeKind.Enum &&
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
47if (type == null || type.TypeKind == TypeKind.Error || type.IsAnonymousType)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
392semanticModel.GetSymbolInfo(baseType.Type, cancellationToken).GetAnySymbol() is INamedTypeSymbol { TypeKind: TypeKind.Class })
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (126)
Semantics\DeconstructionTests.cs (6)
4272Assert.Equal(TypeKind.Struct, typeInfo.Type.TypeKind); 4273Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)typeInfo.Type).TypeArguments[0].TypeKind); 4274Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)typeInfo.Type).TypeArguments[1].TypeKind); 4531Assert.Equal(TypeKind.Struct, typeInfo.Type.TypeKind); 4532Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)typeInfo.Type).TypeArguments[0].TypeKind); 4533Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)typeInfo.Type).TypeArguments[1].TypeKind);
Semantics\ExpressionBodiedMemberTests.cs (1)
259Assert.Equal(TypeKind.TypeParameter, semanticInfo.Type.TypeKind);
Semantics\ForEachTests.cs (1)
2891Assert.NotEqual(TypeKind.Error, localSymbolType.TypeKind);
Semantics\FunctionPointerTests.cs (5)
212Assert.Equal(TypeKind.FunctionPointer, typeInfo.Type!.TypeKind); 298Assert.Equal(TypeKind.FunctionPointer, typeInfo.ConvertedType!.TypeKind); 1940Assert.Equal(TypeKind.TypeParameter, m1InvocationSymbol.TypeArguments[0].TypeKind); 1942Assert.Equal(TypeKind.TypeParameter, functionPointer.Signature.ReturnType.TypeKind); 1943Assert.Equal(TypeKind.TypeParameter, functionPointer.Signature.Parameters[0].Type.TypeKind);
Semantics\InteractiveSemanticModelTests.cs (9)
46Assert.Equal(TypeKind.Error, baseType.TypeKind); 158Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 160Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 183Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 185Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 209Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 211Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 237Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 239Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind);
Semantics\IteratorTests.cs (1)
463Assert.Equal(TypeKind.Error, typeInfo.Type.TypeKind);
Semantics\LambdaTests.cs (15)
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); 2337Assert.Equal(TypeKind.Struct, 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); 3001Assert.Equal(TypeKind.Error, model.GetTypeInfo(contentType).Type.TypeKind); 3010Assert.Equal(TypeKind.Error, model.GetTypeInfo(b).Type.TypeKind);
Semantics\LocalFunctionTests.cs (2)
1779Assert.Equal(TypeKind.Error, aTypeInfo.Type.TypeKind); 1854Assert.Equal(TypeKind.Error, aTypeInfo.Type.TypeKind);
Semantics\NativeIntegerTests.cs (4)
239Assert.Equal(TypeKind.Struct, type.TypeKind); 735Assert.Equal(TypeKind.Error, type.TypeKind); 15419Assert.Equal(TypeKind.Interface, symbol.TypeKind); 15449Assert.Equal(TypeKind.TypeParameter, symbol.TypeKind);
Semantics\NullableReferenceTypesTests.cs (30)
116619Assert.Equal(TypeKind.Struct, compilation1.GetTypeByMetadataName("A").TypeKind); 116620Assert.Equal(TypeKind.Enum, compilation1.GetTypeByMetadataName("B").TypeKind); 116621Assert.Equal(TypeKind.Class, compilation1.GetTypeByMetadataName("C").TypeKind); 116622Assert.Equal(TypeKind.Delegate, compilation1.GetTypeByMetadataName("D").TypeKind); 116623Assert.Equal(TypeKind.Interface, compilation1.GetTypeByMetadataName("I1").TypeKind); 116639Assert.Equal(TypeKind.Struct, compilation2.GetTypeByMetadataName("A").TypeKind); 116640Assert.Equal(TypeKind.Enum, compilation2.GetTypeByMetadataName("B").TypeKind); 116641Assert.Equal(TypeKind.Class, compilation2.GetTypeByMetadataName("C").TypeKind); 116642Assert.Equal(TypeKind.Delegate, compilation2.GetTypeByMetadataName("D").TypeKind); 116643Assert.Equal(TypeKind.Interface, compilation2.GetTypeByMetadataName("I1").TypeKind); 116650Assert.Equal(TypeKind.Struct, compilation3.GetTypeByMetadataName("A").TypeKind); 116651Assert.Equal(TypeKind.Enum, compilation3.GetTypeByMetadataName("B").TypeKind); 116652Assert.Equal(TypeKind.Class, compilation3.GetTypeByMetadataName("C").TypeKind); 116653Assert.Equal(TypeKind.Delegate, compilation3.GetTypeByMetadataName("D").TypeKind); 116654Assert.Equal(TypeKind.Interface, compilation3.GetTypeByMetadataName("I1").TypeKind); 116675Assert.Equal(TypeKind.Class, a.TypeKind); 116677Assert.Equal(TypeKind.Class, b.TypeKind); 116679Assert.Equal(TypeKind.Class, c.TypeKind); 116681Assert.Equal(TypeKind.Class, d.TypeKind); 116683Assert.Equal(TypeKind.Interface, i1.TypeKind); 116743Assert.Equal(TypeKind.Class, a.TypeKind); 116745Assert.Equal(TypeKind.Class, b.TypeKind); 116747Assert.Equal(TypeKind.Class, c.TypeKind); 116749Assert.Equal(TypeKind.Class, d.TypeKind); 116751Assert.Equal(TypeKind.Interface, i1.TypeKind); 116759Assert.Equal(TypeKind.Struct, compilation7.GetTypeByMetadataName("A").TypeKind); 116760Assert.Equal(TypeKind.Enum, compilation7.GetTypeByMetadataName("B").TypeKind); 116761Assert.Equal(TypeKind.Class, compilation7.GetTypeByMetadataName("C").TypeKind); 116762Assert.Equal(TypeKind.Delegate, compilation7.GetTypeByMetadataName("D").TypeKind); 116763Assert.Equal(TypeKind.Interface, compilation7.GetTypeByMetadataName("I1").TypeKind);
Semantics\QueryTests.cs (2)
3382Assert.NotEqual(TypeKind.Error, typeInfo2.Type.TypeKind); 3391Assert.NotEqual(TypeKind.Error, typeInfo1.Type.TypeKind);
Semantics\ScriptSemanticsTests.cs (4)
251Assert.Equal(TypeKind.Error, summary.Type.TypeKind); 252Assert.Equal(TypeKind.Error, summary.ConvertedType.TypeKind); 568Assert.Equal(TypeKind.Error, summary.Type.TypeKind); 569Assert.Equal(TypeKind.Error, summary.ConvertedType.TypeKind);
Semantics\SimpleLambdaParametersWithModifiersTests.cs (1)
890Assert.True(symbol.Parameters is [{ Name: "x", Type.TypeKind: TypeKind.Dynamic, RefKind: RefKind.Ref, IsOptional: false }]);
Semantics\UnsafeTests.cs (10)
7271Assert.Equal(TypeKind.Pointer, type.TypeKind); 7340Assert.Equal(TypeKind.Pointer, typeInfo.Type.TypeKind); 7341Assert.Equal(TypeKind.Error, ((IPointerTypeSymbol)typeInfo.Type).PointedAtType.TypeKind); 7378Assert.Equal(TypeKind.Pointer, typeInfo.Type.TypeKind); 7379Assert.Equal(TypeKind.Error, ((IPointerTypeSymbol)typeInfo.Type).PointedAtType.TypeKind); 8351Assert.Equal(TypeKind.Pointer, typeInfo.ConvertedType.TypeKind); 8387Assert.Equal(TypeKind.Pointer, type.TypeKind); 8391Assert.Equal(TypeKind.Pointer, convertedType.TypeKind); 10186Assert.Equal(TypeKind.Pointer, type.TypeKind); 10698Assert.Equal(TypeKind.Enum, type.TypeKind);
Semantics\UseSiteErrorTests.cs (35)
2309Assert.Equal(TypeKind.Struct, compilation1.GetTypeByMetadataName("A").TypeKind); 2310Assert.Equal(TypeKind.Enum, compilation1.GetTypeByMetadataName("B").TypeKind); 2311Assert.Equal(TypeKind.Class, compilation1.GetTypeByMetadataName("C").TypeKind); 2312Assert.Equal(TypeKind.Delegate, compilation1.GetTypeByMetadataName("D").TypeKind); 2313Assert.Equal(TypeKind.Interface, compilation1.GetTypeByMetadataName("I1").TypeKind); 2327Assert.Equal(TypeKind.Struct, compilation2.GetTypeByMetadataName("A").TypeKind); 2328Assert.Equal(TypeKind.Enum, compilation2.GetTypeByMetadataName("B").TypeKind); 2329Assert.Equal(TypeKind.Class, compilation2.GetTypeByMetadataName("C").TypeKind); 2330Assert.Equal(TypeKind.Delegate, compilation2.GetTypeByMetadataName("D").TypeKind); 2331Assert.Equal(TypeKind.Interface, compilation2.GetTypeByMetadataName("I1").TypeKind); 2338Assert.Equal(TypeKind.Struct, compilation3.GetTypeByMetadataName("A").TypeKind); 2339Assert.Equal(TypeKind.Enum, compilation3.GetTypeByMetadataName("B").TypeKind); 2340Assert.Equal(TypeKind.Class, compilation3.GetTypeByMetadataName("C").TypeKind); 2341Assert.Equal(TypeKind.Delegate, compilation3.GetTypeByMetadataName("D").TypeKind); 2342Assert.Equal(TypeKind.Interface, compilation3.GetTypeByMetadataName("I1").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); 2371Assert.Equal(TypeKind.Interface, i1.TypeKind); 2383Assert.Equal(TypeKind.Struct, compilation5.GetTypeByMetadataName("A").TypeKind); 2384Assert.Equal(TypeKind.Enum, compilation5.GetTypeByMetadataName("B").TypeKind); 2385Assert.Equal(TypeKind.Class, compilation5.GetTypeByMetadataName("C").TypeKind); 2386Assert.Equal(TypeKind.Delegate, compilation5.GetTypeByMetadataName("D").TypeKind); 2387Assert.Equal(TypeKind.Interface, compilation5.GetTypeByMetadataName("I1").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); 2416Assert.Equal(TypeKind.Interface, i1.TypeKind); 2424Assert.Equal(TypeKind.Struct, compilation7.GetTypeByMetadataName("A").TypeKind); 2425Assert.Equal(TypeKind.Enum, compilation7.GetTypeByMetadataName("B").TypeKind); 2426Assert.Equal(TypeKind.Class, compilation7.GetTypeByMetadataName("C").TypeKind); 2427Assert.Equal(TypeKind.Delegate, compilation7.GetTypeByMetadataName("D").TypeKind); 2428Assert.Equal(TypeKind.Interface, compilation7.GetTypeByMetadataName("I1").TypeKind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (560)
Compilation\GetSemanticInfoTests.cs (5)
1497Assert.Equal(TypeKind.Error, bindInfo.Type.TypeKind); 1498Assert.Equal(TypeKind.Struct, bindInfo.ConvertedType.TypeKind); 1818Assert.Equal(TypeKind.Array, candidate.Parameters.Last().Type.TypeKind); 1819Assert.Equal(TypeKind.TypeParameter, ((IMethodSymbol)candidate.OriginalDefinition).Parameters.Last().Type.TypeKind); 4381Assert.Equal(TypeKind.Enum, info.Type.TypeKind);
Compilation\SemanticModelAPITests.cs (8)
2277Assert.Equal(TypeKind.Pointer, typeInfo.Type.TypeKind); 2279Assert.Equal(TypeKind.Pointer, typeInfo.ConvertedType.TypeKind); 3165Assert.Equal(TypeKind.Error, ((IParameterSymbol)symbol).Type.TypeKind); 3198Assert.Equal(TypeKind.Error, info.ConvertedType.TypeKind); 4362Assert.Equal(TypeKind.Dynamic, dynamicType.Type.TypeKind); 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 (7)
1012Assert.Equal(TypeKind.Class, symbol.TypeKind); 2330Assert.Equal(TypeKind.Error, info.Type.TypeKind); 2983Assert.Equal(TypeKind.Interface, dsym2.TypeKind); 2989Assert.Equal(TypeKind.Struct, dsym3.TypeKind); 4748Assert.Equal(TypeKind.Enum, enumSymbol.TypeKind); 4778Assert.Equal(TypeKind.Struct, structSymbol.TypeKind); 4779Assert.Equal(TypeKind.Interface, interfaceSymbol.TypeKind);
Compilation\SemanticModelGetSemanticInfoTests.cs (525)
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); 304Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 306Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 457Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 459Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 497Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 499Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 540Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 542Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 588Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 590Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 636Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 638Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 689Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 691Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 720Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 722Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 756Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 758Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1638Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 1640Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1714Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 1716Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 1745Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1774Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 1776Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 1803Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 1805Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 1833Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 1835Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 1863Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 1865Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 1893Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 1895Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1922Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 1924Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1952Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 1954Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1982Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 1984Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2012Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2014Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2044Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2046Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2076Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2078Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2113Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2115Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2146Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2148Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2186Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 2188Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 2258Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2260Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2293Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2295Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2343Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2345Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2389Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2391Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2432Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2434Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2487Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2489Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2539Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2541Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2571Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2573Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2644Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2646Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2685Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2687Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2865Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2867Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2941Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2943Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2977Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2979Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3067Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3069Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3112Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3114Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3389Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 3391Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 3420Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 3422Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3452Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 3454Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 3487Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 3489Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 3518Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 3520Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 3584Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3586Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3622Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3624Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3666Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3668Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3700Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3702Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3734Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3736Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3768Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3770Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3798Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 3800Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 3830Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 3832Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 3859Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3861Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3894Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3896Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3933Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3967Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 3969Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 4002Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4004Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4033Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4035Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4064Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4066Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4130Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4132Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4154Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 4156Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 4180Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 4182Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 4241Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4243Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4275Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4277Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4313Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4315Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4367Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 4369Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 4438Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4440Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4469Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4471Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4564Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4566Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4602Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4604Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4638Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4640Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4668Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 4670Assert.Equal(TypeKind.Enum, semanticInfo.ConvertedType.TypeKind); 4706Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 4708Assert.Equal(TypeKind.Enum, semanticInfo.ConvertedType.TypeKind); 4742Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 4744Assert.Equal(TypeKind.Enum, semanticInfo.ConvertedType.TypeKind); 4778Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 4780Assert.Equal(TypeKind.Enum, semanticInfo.ConvertedType.TypeKind); 4809Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 4811Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4846Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4848Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4873Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4875Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4959Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4961Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5011Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5013Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5101Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5103Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5148Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5150Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5194Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5196Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5273Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5275Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5315Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5317Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5439Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 5441Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 5475Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5477Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5504Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5506Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5537Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5539Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5569Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5571Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5601Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5603Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5653Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 5689Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5699Assert.Equal(TypeKind.Error, lambdaSym.Parameters[0].Type.TypeKind); 5723Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5725Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5756Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5758Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5790Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5792Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5823Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5825Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5857Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5859Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5891Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5893Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5926Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5928Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5959Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5961Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5993Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5995Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6026Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6028Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6054Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6056Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6086Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6088Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6112Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6114Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6139Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6141Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6172Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6174Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6324Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6326Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6339Assert.Equal(TypeKind.Error, param.Type.TypeKind); 6360Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6362Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6432Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 6514Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6516Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6549Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6551Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6586Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6588Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6670Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6672Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6801Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6803Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6870Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6872Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6915Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6917Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6960Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6962Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7073Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7075Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7101Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 7103Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 7132Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 7134Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 7164Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7166Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 7196Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 7198Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 7228Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7230Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 7283Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7285Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7311Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7313Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7338Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7340Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7373Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7375Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7394Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7396Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7477Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7479Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7521Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 7693Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 7695Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 7722Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7724Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 7846Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7848Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 7912Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7914Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 7978Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7980Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 8298Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 8364Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 8366Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8398Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 8400Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8509Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 8511Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 8555Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 8557Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8600Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 8602Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8641Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 8681Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 8721Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 8723Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 8765Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8804Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 8806Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 8846Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 8848Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 8888Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 8890Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 8928Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 8930Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 9059Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9118Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9120Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9353Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 9355Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 9412Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 9414Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 9451Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9453Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9609Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 9611Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 9664Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9666Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9715Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9717Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9775Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 9777Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 9826Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9828Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9881Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 9883Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 9912Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9914Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9946Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9948Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9982Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9984Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10018Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10020Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10054Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10056Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10098Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10100Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10135Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10137Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10172Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10174Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10211Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10213Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10242Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10244Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10277Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10279Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10312Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 10314Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 10346Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 10348Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 10380Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 10382Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 10461Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 10463Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 10489Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10518Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10553Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 10555Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 10595Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 10597Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 10632Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 10634Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 10669Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 10671Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 10708Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 10710Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 10751Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 10753Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 10793Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10795Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10830Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10832Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10899Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 10901Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 11006Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11008Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11037Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11039Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11070Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11072Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11103Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11105Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11139Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 11141Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 11217Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 11219Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 11261Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11263Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11298Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11300Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11335Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11337Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11375Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11377Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11422Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11424Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11455Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11457Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11492Assert.Equal(TypeKind.TypeParameter, semanticInfo.Type.TypeKind); 11494Assert.Equal(TypeKind.TypeParameter, semanticInfo.ConvertedType.TypeKind); 11567Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11569Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11705Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11707Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11790Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 11792Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 11826Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 11828Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 11861Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 11863Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 11896Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 11898Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 11932Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 11934Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 11968Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 11970Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 12003Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 12005Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 12038Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 12040Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 12074Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 12076Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 12181Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 12183Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12251Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 12253Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12317Assert.Equal(TypeKind.TypeParameter, semanticInfo.Type.TypeKind); 12319Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12421Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 12423Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12479Assert.Equal(TypeKind.Dynamic, semanticInfo.Type.TypeKind); 12481Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12521Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12523Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12567Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12605Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12607Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12639Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12641Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12671Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 12673Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12734Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12736Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12766Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12768Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12798Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12800Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12841Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12843Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12917Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12919Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12953Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12955Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12991Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12993Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 13032Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13034Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13065Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 13093Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 13095Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 13124Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13126Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13158Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13160Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13192Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13194Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13258Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 13260Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 13318Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13320Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13437Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 13439Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 13498Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 13500Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 13799Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 13801Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 13834Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 13836Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 13868Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13870Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13907Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13909Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13946Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13948Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13973Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 13975Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 14000Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 14002Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 14076Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14078Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14114Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14116Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14154Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 14156Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 14240Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14242Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14332Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14334Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14375Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14377Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14536Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14538Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14621Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 14623Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 15079Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 15081Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 15147Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 15149Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 15178Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 15180Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 15209Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 15211Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 15240Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 15242Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 15271Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 15273Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 15333Assert.Equal(TypeKind.Dynamic, semanticInfo.Type.TypeKind); 15335Assert.Equal(TypeKind.Dynamic, semanticInfo.ConvertedType.TypeKind); 15400Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 15402Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind);
DocumentationComments\CrefTests.cs (1)
6540Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)actualSymbol1).TypeArguments.Single().TypeKind);
Symbols\AssemblyAndNamespaceTests.cs (1)
382Assert.Equal(TypeKind.Class, objectType.TypeKind);
Symbols\CorLibrary\CorTypes.cs (2)
202Assert.Equal(TypeKind.Error, t.TypeKind); 214Assert.Equal(TypeKind.Error, t.TypeKind);
Symbols\MissingSpecialMember.cs (7)
158Assert.Equal(TypeKind.Error, specialType.TypeKind); 163Assert.Equal(TypeKind.Class, lookupType.TypeKind); 236Assert.Equal(TypeKind.Struct, specialType.TypeKind); 240Assert.Equal(TypeKind.Struct, lookupType.TypeKind); 276Assert.Equal(TypeKind.Class, lookupType.TypeKind); 309Assert.Equal(TypeKind.Enum, lookupType.TypeKind); 385Assert.Equal(TypeKind.Class, lookupType.TypeKind);
Symbols\Source\DelegateTests.cs (1)
130Assert.Equal(TypeKind.Delegate, v.TypeKind);
Symbols\SymbolDistinguisherTests.cs (2)
318Assert.NotEqual(TypeKind.Error, validType.TypeKind); 319Assert.Equal(TypeKind.Error, errorType.TypeKind);
Symbols\TypeTests.cs (1)
1776Assert.Equal(TypeKind.Interface, ((ITypeSymbol)tinfo.Type).TypeKind);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (8)
Parsing\ReadOnlyStructs.cs (8)
48Assert.Equal(TypeKind.Struct, s1.TypeKind); 54Assert.Equal(TypeKind.Struct, s2.TypeKind); 60Assert.Equal(TypeKind.Struct, s3.TypeKind); 122Assert.Equal(TypeKind.Class, s1.TypeKind); 128Assert.Equal(TypeKind.Delegate, s2.TypeKind); 134Assert.Equal(TypeKind.Interface, s3.TypeKind); 157Assert.Equal(TypeKind.Struct, s1.TypeKind); 163Assert.Equal(TypeKind.Struct, s2.TypeKind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
Extensions.cs (3)
713return type.TypeKind == TypeKind.Dynamic; 718return type.TypeKind == TypeKind.Delegate; 835return type.TypeKind == TypeKind.Enum ? ((INamedTypeSymbol)type).EnumUnderlyingType : type;
Microsoft.CodeAnalysis.CSharp.Workspaces (37)
Classification\SyntaxClassification\SyntaxTokenClassifier.cs (1)
24private static readonly Func<ITypeSymbol, bool> s_shouldInclude = t => t.TypeKind != TypeKind.Error && t.GetArity() > 0;
Rename\CSharpRenameRewriterLanguageService.cs (2)
793if (renamedSymbol is INamedTypeSymbol { TypeKind: not TypeKind.Enum } namedType) 798if (renamedSymbol.ContainingSymbol is INamedTypeSymbol { TypeKind: not TypeKind.Enum } containingNamedType &&
Simplification\CSharpSimplificationService.Expander.cs (1)
793if (typeinfo.Type != null && typeinfo.Type.TypeKind == TypeKind.Dynamic)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
42if (typeSymbol.TypeKind is TypeKind.Class or TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
446if (parameter.Type.OriginalDefinition.TypeKind != TypeKind.TypeParameter)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (8)
252if (originalDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate) 269if (rewrittenDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate) 315if (originalConvertedType is null || originalConvertedType.TypeKind == TypeKind.Error) 356if (rewrittenConvertedType is null || rewrittenConvertedType.TypeKind == TypeKind.Error || !rewrittenConversion.Exists) 561originalConvertedType.IsReferenceType && rewrittenConvertedType.TypeKind == TypeKind.Dynamic) 987if (!original.IsReferenceType || original.TypeKind == TypeKind.Interface) 1311if (originalMemberSymbol.ContainingType.TypeKind == TypeKind.Interface) 1351rewrittenType.TypeKind == TypeKind.Array ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
276if (declaredType.TypeKind == TypeKind.Dynamic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
60if (type is INamedTypeSymbol { TypeKind: TypeKind.Enum } enumType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
298if (constraintType.IsReferenceType && constraintType.TypeKind != TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (8)
93if (info.Context.GenerateMembers && namedType.TypeKind != TypeKind.Delegate) 185if (namedType.TypeKind == TypeKind.Enum) 189else if (namedType.TypeKind == TypeKind.Delegate) 197var isRecordClass = namedType.TypeKind is TypeKind.Class; 208var kind = namedType.TypeKind == TypeKind.Struct ? SyntaxKind.StructDeclaration : 209namedType.TypeKind == TypeKind.Interface ? SyntaxKind.InterfaceDeclaration : SyntaxKind.ClassDeclaration; 290if (namedType.TypeKind == TypeKind.Class) 318if (namedType.TypeKind == TypeKind.Class && namedType.BaseType != null && namedType.BaseType.SpecialType != Microsoft.CodeAnalysis.SpecialType.System_Object)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
3059return ((INamedTypeSymbol)symbol).TypeKind == TypeKind.Enum; 3062return target.IsType && ((ITypeSymbol)target).TypeKind == TypeKind.Enum;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (3)
59typeParameter.ConstraintTypes.Where(t => t.TypeKind == TypeKind.Class).Concat( 60typeParameter.ConstraintTypes.Where(t => t.TypeKind == TypeKind.Interface).Concat( 61typeParameter.ConstraintTypes.Where(t => t.TypeKind is not TypeKind.Class and not TypeKind.Interface)));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.ExpressionSyntaxGeneratorVisitor.cs (2)
53if (symbol.ContainingType.TypeKind == TypeKind.Submission) 67if (symbol.TypeKind != TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (4)
195if (symbol.TypeKind == TypeKind.Error && symbol.Name == "var") 240if (innerType.TypeKind != TypeKind.Pointer) 275if (symbol.ContainingType.TypeKind != TypeKind.Submission) 294if (symbol.TypeKind != TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
442if (type.TypeKind == TypeKind.Delegate)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
SymbolFinder\DependentTypeFinderTests.cs (2)
585var delegates = transitiveImpls.Where(i => i.TypeKind == TypeKind.Delegate); 615var enums = transitiveImpls.Where(i => i.TypeKind == TypeKind.Enum);
SymbolFinder\FindSymbolAtPositionTests.cs (1)
62Assert.Equal(TypeKind.Enum, fieldSymbol.ContainingType.TypeKind);
Microsoft.CodeAnalysis.Features (70)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs (1)
56ContainingType.TypeKind == TypeKind.Interface ||
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (1)
106=> typeSymbol.TypeKind is TypeKind.Class or TypeKind.Struct;
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (1)
164return type.TypeKind is not (TypeKind.Delegate or TypeKind.Struct or TypeKind.FunctionPointer or TypeKind.Pointer);
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (1)
91if (enclosingSymbol.TypeKind is not (TypeKind.Struct or TypeKind.Class))
Completion\Providers\AbstractPartialTypeCompletionProvider.cs (1)
95.Where(symbol => declaredSymbol.TypeKind == symbol.TypeKind &&
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
91if (namedType.TypeKind == TypeKind.Interface)
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionProvider.cs (1)
80TypeKind: not TypeKind.Error
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
52if (type is { TypeKind: TypeKind.Error })
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
279if (collectionType.TypeKind == TypeKind.Interface && knownCollectionInterfaces.Contains(collectionType.OriginalDefinition))
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (3)
297return (symbol is IParameterSymbol { ContainingType: not { TypeKind: TypeKind.Delegate } }) 334=> symbol.TypeKind switch 345=> symbol.IsConst ? ((symbol.ContainingType.TypeKind == TypeKind.Enum) ? FeaturesResources.enum_value : FeaturesResources.const_field) :
ExtractInterface\AbstractExtractInterfaceService.cs (3)
92if (semanticModel.GetDeclaredSymbol(typeNode, cancellationToken) is not INamedTypeSymbol { TypeKind: not TypeKind.Extension } typeToExtractFrom) 263var candidateInterfaceName = type.TypeKind == TypeKind.Interface ? type.Name : "I" + type.Name; 320if (typeToExtractFrom.TypeKind == TypeKind.Interface)
ExtractMethod\MethodExtractor.Analyzer.cs (1)
116&& thisParameterBeingRead is { Type: { TypeKind: TypeKind.Struct, IsReadOnly: false } };
ExtractMethod\MethodExtractor.cs (1)
231if (type.TypeKind is TypeKind.Error or TypeKind.Unknown)
FindUsages\AbstractFindUsagesService_FindImplementations.cs (1)
197else if (symbol is INamedTypeSymbol { TypeKind: TypeKind.Class } namedType)
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.State.cs (1)
70if (ContainingType == null || ContainingType.TypeKind == TypeKind.Interface)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (2)
90if (containingType?.TypeKind is not TypeKind.Class and not TypeKind.Struct) 301if (generateEquals && containingType.TypeKind == TypeKind.Struct)
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (3)
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)
GenerateType\AbstractGenerateTypeService.State.cs (3)
239if (baseType.TypeKind is not TypeKind.Class and not TypeKind.Interface) 269(BaseTypeOrInterfaceOpt == null || BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface)) 287if (TypeToGenerateInOpt.TypeKind is not TypeKind.Class and
GoToBase\FindBaseHelpers.cs (1)
18TypeKind: TypeKind.Class or TypeKind.Interface or TypeKind.Struct,
InheritanceMargin\AbstractInheritanceMarginService.cs (1)
72return !symbol.IsStatic && namedType.TypeKind is TypeKind.Interface or TypeKind.Class or TypeKind.Struct;
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (2)
315if (memberSymbol.TypeKind == TypeKind.Interface) 328Debug.Assert(memberSymbol.TypeKind is TypeKind.Class or TypeKind.Struct);
InitializeParameter\AbstractInitializeParameterCodeRefactoringProvider.cs (1)
83methodSymbol.ContainingType.TypeKind == TypeKind.Interface)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (2)
465if (symbol.TypeKind == TypeKind.Delegate) 544if (symbol.ContainingType != null && symbol.ContainingType.TypeKind == TypeKind.Enum)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
67public TypeKind TypeKind => _symbol.TypeKind;
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
145return oldType.TypeKind;
PullMemberUp\MemberAndDestinationValidator.cs (1)
16if (destination.TypeKind is not TypeKind.Interface and not TypeKind.Class)
PullMemberUp\MembersPuller.cs (2)
63return pullMembersUpOptions.Destination.TypeKind switch 491return destination.TypeKind == TypeKind.Interface
PullMemberUp\PullMembersUpOptionsBuilder.cs (1)
18if (destination.TypeKind == TypeKind.Interface)
RQName\RQNodeBuilder.cs (3)
289else if (symbol.TypeKind == TypeKind.TypeParameter) 293else if (symbol.TypeKind == TypeKind.Unknown) 297else if (symbol.TypeKind == TypeKind.Dynamic)
Shared\Extensions\ISymbolExtensions_2.cs (2)
40if (containingType != null && containingType.TypeKind == TypeKind.Enum) 58switch (((INamedTypeSymbol)symbol).TypeKind)
Snippets\SnippetFunctionService.cs (1)
59if (typeSymbol?.TypeKind != TypeKind.Enum)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (1)
27if (switchExpressionType?.TypeKind == TypeKind.Enum)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
68if (switchExpressionType?.TypeKind == TypeKind.Enum)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
183if (value.Type.TypeKind == TypeKind.Dynamic)
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\AddAccessibilityModifiers\AddAccessibilityModifiersHelpers.cs (1)
50if (symbol.ContainingType?.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
406return TypeToGenerateIn?.TypeKind is (TypeKind?)TypeKind.Class or (TypeKind?)TypeKind.Struct;
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.State.cs (2)
58baseType.TypeKind == TypeKind.Error) 108if (classType.TypeKind == TypeKind.Struct)
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (2)
43if (!typeKinds.Contains(typeToGenerateIn.TypeKind)) 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)
45state.TypeToGenerateIn.TypeKind != TypeKind.Interface &&
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (2)
123return _state.TypeToGenerateIn.TypeKind != TypeKind.Interface && _refKind != RefKind.None 130if (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)
84if (this.TypeToGenerateIn.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
252if (idisposable?.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
277var 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)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (2)
185conversion.Type.TypeKind != TypeKind.Error) 189if (conversion.Operand.Type == null || conversion.Operand.Type.TypeKind != TypeKind.Error)
Microsoft.CodeAnalysis.PublicApiAnalyzers (15)
DeclarePublicApiAnalyzer.Impl.cs (5)
182if (namedType is { TypeKind: TypeKind.Class, InstanceConstructors.Length: 1 } or { TypeKind: TypeKind.Struct }) 311method.ContainingType.TypeKind == TypeKind.Class && 789if (methodSymbol is { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Enum }) 794if (methodSymbol is { ContainingType.TypeKind: TypeKind.Delegate, MethodKind: not MethodKind.DelegateInvoke })
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
690=> methodSymbol.Parameters.Any(p => p.Type.TypeKind == TypeKind.Delegate);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
140if (symbol.TypeKind != TypeKind.Class)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (3)
94typeSymbol.TypeKind == TypeKind.Error; 397if (type1.TypeKind == TypeKind.TypeParameter && 398type2.TypeKind == TypeKind.TypeParameter &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (5)
53switch (possibleBase.TypeKind) 56if (type.TypeKind == TypeKind.Interface) 99if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface) 114if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter) 352if (invocationTarget.TypeKind == TypeKind.Interface)
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 (13)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134switch (namedType.TypeKind)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
690=> methodSymbol.Parameters.Any(p => p.Type.TypeKind == TypeKind.Delegate);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
140if (symbol.TypeKind != TypeKind.Class)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
103if (operation.Type.TypeKind == TypeKind.Enum)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (3)
94typeSymbol.TypeKind == TypeKind.Error; 397if (type1.TypeKind == TypeKind.TypeParameter && 398type2.TypeKind == TypeKind.TypeParameter &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (5)
53switch (possibleBase.TypeKind) 56if (type.TypeKind == TypeKind.Interface) 99if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface) 114if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter) 352if (invocationTarget.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
Microsoft.CodeAnalysis.Test.Utilities (7)
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (6)
205if (derivedType.TypeKind == TypeKind.Class || derivedType.TypeKind == TypeKind.Structure) 211else if (derivedType.TypeKind == TypeKind.Interface) 226return baseType.TypeKind == TypeKind.Class && baseType.SpecialType == SpecialType.System_Object; 261TypeKind targetTypeKind = targetType.TypeKind; 262TypeKind sourceTypeKind = sourceType.TypeKind;
Diagnostics\EmptyArrayAnalyzer.cs (1)
76&& elementType?.TypeKind != TypeKind.Pointer)
Microsoft.CodeAnalysis.VisualBasic (12)
SymbolDisplay\SymbolDisplayVisitor.Members.vb (3)
29If symbol.ContainingType.TypeKind = TypeKind.Enum Then 616(containingType.TypeKind <> TypeKind.Interface AndAlso Not IsEnumMember(symbol))) Then 620(containingType Is Nothing OrElse containingType.TypeKind <> TypeKind.Module) AndAlso
SymbolDisplay\SymbolDisplayVisitor.Types.vb (5)
199symbol.TypeKind = TypeKind.Delegate AndAlso 253Select Case symbol.TypeKind 270Throw ExceptionUtilities.UnexpectedValue(symbol.TypeKind) 323Select Case symbol.TypeKind 438Dim keyword = GetTypeKindKeyword(symbol.TypeKind)
SymbolDisplay\SymbolDisplayVisitor.vb (2)
349(containingType.TypeKind <> TypeKind.Interface AndAlso Not IsEnumMember(symbol))) Then 396symbol.ContainingType.TypeKind = TypeKind.Enum AndAlso
SymbolDisplay\SymbolDisplayVisitor_Minimal.vb (1)
107If symbol.TypeKind <> TypeKind.Error Then
Symbols\TypeSymbol.vb (1)
581Private ReadOnly Property ITypeSymbol_TypeKind As TypeKind Implements ITypeSymbol.TypeKind, ITypeSymbolInternal.TypeKind
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
246If parameter.Type.TypeKind <> TypeKind.TypeParameter Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (21)
src\Analyzers\VisualBasic\CodeFixes\GenerateDefaultConstructors\VisualBasicGenerateDefaultConstructorsService.vb (1)
35Return classType IsNot Nothing AndAlso classType.TypeKind = TypeKind.Class
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (1)
49ElseIf type?.TypeKind = TypeKind.Enum Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (8)
53declaration = If(options.Context.GenerateMembers AndAlso namedType.TypeKind <> TypeKind.Delegate, 94If namedType.TypeKind = TypeKind.Enum Then 96ElseIf namedType.TypeKind = TypeKind.Delegate Then 100Dim isInterface = namedType.TypeKind = TypeKind.Interface 101Dim isStruct = namedType.TypeKind = TypeKind.Struct 102Dim isModule = namedType.TypeKind = TypeKind.Module 187If namedType.TypeKind = TypeKind.Class Then 205If namedType.TypeKind = TypeKind.Struct OrElse
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (1)
113If type?.TypeKind = TypeKind.Module Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (1)
328objectCreationType.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\VisualBasicSyntaxContextExtensions.vb (1)
125objectCreationType.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxGeneratorVisitor.vb (2)
40If symbol.ContainingType.TypeKind = TypeKind.Submission Then 48If symbol.TypeKind <> TypeKind.[Error] Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\IMethodSymbolExtensions.vb (1)
32If parameter.Type.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (2)
160If symbol.ContainingType.TypeKind = TypeKind.Submission Then 167If _addGlobal AndAlso symbol.TypeKind <> TypeKind.[Error] Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (3)
29If info.Type IsNot Nothing AndAlso info.Type.TypeKind <> TypeKind.Error Then 33If info.ConvertedType IsNot Nothing AndAlso info.ConvertedType.TypeKind <> TypeKind.Error Then 295If namedType.TypeKind = TypeKind.Delegate Then
Microsoft.CodeAnalysis.VisualBasic.Features (25)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
132If typeSymbol IsNot Nothing AndAlso typeSymbol.IsKind(SymbolKind.NamedType) AndAlso DirectCast(typeSymbol, ITypeSymbol).TypeKind = TypeKind.Delegate Then
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (6)
189Not (targetType.TypeKind = TypeKind.Class OrElse targetType.TypeKind = TypeKind.Interface) OrElse 260If targetType Is Nothing OrElse (targetType.TypeKind <> TypeKind.Interface AndAlso targetType.TypeKind <> TypeKind.Class) Then 356Not (targetType.TypeKind = TypeKind.Class OrElse targetType.TypeKind = TypeKind.Interface) OrElse
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (1)
147If type IsNot Nothing AndAlso within IsNot Nothing AndAlso type.TypeKind <> TypeKind.[Delegate] Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (4)
647Return method.ContainingType.TypeKind <> TypeKind.Struct 1433Select Case symbol.TypeKind 2016If type.TypeKind = TypeKind.Module Then 2046If newSymbol.ContainingType.TypeKind = TypeKind.Enum Then
ExtractMethod\VisualBasicMethodExtractor.PostProcessor.vb (2)
138type.TypeKind = TypeKind.Error OrElse 139type.TypeKind = TypeKind.Unknown Then
ExtractMethod\VisualBasicSelectionResult.vb (1)
192info.ConvertedType.TypeKind <> TypeKind.Interface Then
InitializeParameter\VisualBasicInitializeMemberFromParameterCodeRefactoringProvider.vb (2)
38Return If(containingType.TypeKind = TypeKind.Class Or containingType.TypeKind = TypeKind.Module, Accessibility.Private, Accessibility.Public)
NavigationBar\VisualBasicNavigationBarItemService.vb (5)
111If type.TypeKind = TypeKind.Enum Then 116If type.TypeKind <> TypeKind.Interface Then 215If workspaceSupportsDocumentChanges AndAlso type.TypeKind = TypeKind.Class Then 228If workspaceSupportsDocumentChanges AndAlso type.TypeKind = TypeKind.Class Then 236If type.TypeKind <> TypeKind.Delegate Then
SignatureHelp\FunctionAggregationSignatureHelpProvider.vb (1)
143If parameter.Type.TypeKind = TypeKind.Delegate Then
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.vb (1)
85Dim itemsAndSelected = If(type.TypeKind = TypeKind.Delegate,
src\Analyzers\VisualBasic\CodeFixes\GenerateDefaultConstructors\VisualBasicGenerateDefaultConstructorsService.vb (1)
35Return classType IsNot Nothing AndAlso classType.TypeKind = TypeKind.Class
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (7)
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (6)
685Assert.Equal(TypeKind.Class, typeSymbol.TypeKind) 690Assert.Equal(TypeKind.Class, typeSymbol2.TypeKind) 697Assert.Equal(TypeKind.Structure, typeSymbol3.TypeKind) 705Assert.Equal(TypeKind.Interface, typeSymbol4.TypeKind) 714Assert.Equal(TypeKind.Class, typeSymbol5.TypeKind) 724Assert.Equal(TypeKind.Class, typeSymbol6.TypeKind)
Semantics\NativeIntegerTests.vb (1)
53Assert.Equal(TypeKind.Struct, type.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (6)
SymbolsTests\Source\BindingsTests.vb (6)
361Assert.Equal(TypeKind.Class, typeSymbol.TypeKind) 366Assert.Equal(TypeKind.Class, typeSymbol2.TypeKind) 373Assert.Equal(TypeKind.Structure, typeSymbol3.TypeKind) 381Assert.Equal(TypeKind.Interface, typeSymbol4.TypeKind) 390Assert.Equal(TypeKind.Class, typeSymbol5.TypeKind) 401Assert.Equal(TypeKind.Class, typeSymbol6.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (33)
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (1)
148If TypeOf symbol Is ITypeSymbol AndAlso DirectCast(symbol, ITypeSymbol).TypeKind = TypeKind.Error Then
Recommendations\VisualBasicRecommendationServiceRunner.vb (9)
275If container Is Nothing OrElse TryCast(container, ITypeSymbol)?.TypeKind = TypeKind.Enum Then 404Dim isInterface = TryCast(typeOrAssemblySymbol, ITypeSymbol)?.TypeKind = TypeKind.Interface 463Return namedTypeSymbol.TypeKind = TypeKind.Interface OrElse 479If namedTypeSymbol.TypeKind = TypeKind.Interface Then 497If type.TypeKind = TypeKind.Class AndAlso Not type.IsSealed AndAlso Not Equals(type, within) Then 501If type.TypeKind = TypeKind.Class OrElse 502type.TypeKind = TypeKind.Module OrElse 503type.TypeKind = TypeKind.Struct Then 527If namedTypeSymbol.TypeKind = TypeKind.Class AndAlso Not namedTypeSymbol.IsSealed AndAlso Not Equals(namedTypeSymbol, within) Then
Simplification\Reducers\VisualBasicEscapingReducer.vb (2)
106If type.TypeKind <> TypeKind.Interface AndAlso type.TypeKind <> TypeKind.Enum Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
246If parameter.Type.TypeKind <> TypeKind.TypeParameter Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (1)
49ElseIf type?.TypeKind = TypeKind.Enum Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (8)
53declaration = If(options.Context.GenerateMembers AndAlso namedType.TypeKind <> TypeKind.Delegate, 94If namedType.TypeKind = TypeKind.Enum Then 96ElseIf namedType.TypeKind = TypeKind.Delegate Then 100Dim isInterface = namedType.TypeKind = TypeKind.Interface 101Dim isStruct = namedType.TypeKind = TypeKind.Struct 102Dim isModule = namedType.TypeKind = TypeKind.Module 187If namedType.TypeKind = TypeKind.Class Then 205If namedType.TypeKind = TypeKind.Struct OrElse
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (1)
113If type?.TypeKind = TypeKind.Module Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (1)
328objectCreationType.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\VisualBasicSyntaxContextExtensions.vb (1)
125objectCreationType.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxGeneratorVisitor.vb (2)
40If symbol.ContainingType.TypeKind = TypeKind.Submission Then 48If symbol.TypeKind <> TypeKind.[Error] Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\IMethodSymbolExtensions.vb (1)
32If parameter.Type.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (2)
160If symbol.ContainingType.TypeKind = TypeKind.Submission Then 167If _addGlobal AndAlso symbol.TypeKind <> TypeKind.[Error] Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (3)
29If info.Type IsNot Nothing AndAlso info.Type.TypeKind <> TypeKind.Error Then 33If info.ConvertedType IsNot Nothing AndAlso info.ConvertedType.TypeKind <> TypeKind.Error Then 295If namedType.TypeKind = TypeKind.Delegate Then
Microsoft.CodeAnalysis.Workspaces (73)
Classification\ClassificationExtensions.cs (1)
10=> type.TypeKind switch
Editing\SymbolEditorExtensions.cs (1)
30if (baseOrInterfaceType.TypeKind != TypeKind.Error)
Editing\SyntaxGenerator.cs (2)
758var declaration = type.TypeKind switch 844switch (type.TypeKind)
FindSymbols\FindReferences\DependentTypeFinder.cs (2)
45private static readonly Func<INamedTypeSymbol, bool> s_isInterface = static t => t is { TypeKind: TypeKind.Interface }; 46private static readonly Func<INamedTypeSymbol, bool> s_isNonSealedClass = static t => t is { TypeKind: TypeKind.Class, IsSealed: false };
FindSymbols\FindReferences\DependentTypeFinder_ImplementingTypes.cs (2)
22if (type?.TypeKind == TypeKind.Interface) 54t => t.TypeKind is TypeKind.Class or
FindSymbols\FindReferences\Finders\NamedTypeSymbolReferenceFinder.cs (1)
20=> symbol.TypeKind != TypeKind.Error;
FindSymbols\FindReferences\Finders\OrdinaryMethodReferenceFinder.cs (1)
30return symbol.ContainingType.TypeKind == TypeKind.Delegate
FindSymbols\FindReferences\FindReferencesSearchEngine.SymbolSet.cs (1)
126if (searchSymbol.IsConstructor() && searchSymbol.ContainingType.TypeKind == TypeKind.Delegate)
FindSymbols\SymbolFinder_Hierarchy.cs (1)
129if (symbol is { DeclaredAccessibility: Accessibility.Public, ContainingType.TypeKind: TypeKind.Class or TypeKind.Struct })
Recommendations\AbstractRecommendationServiceRunner.cs (3)
458if (originalConstraintType.TypeKind == TypeKind.TypeParameter) 465else if (originalConstraintType.TypeKind == TypeKind.Interface) 490else if (originalConstraintType.TypeKind == TypeKind.Class)
Rename\RenameUtilities.cs (2)
226symbol.ContainingType.TypeKind == TypeKind.Interface) 338if (symbol is INamedTypeSymbol { IsImplicitlyDeclared: true, TypeKind: TypeKind.Delegate, AssociatedSymbol: not null } typeSymbol)
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
107((INamedTypeSymbol)referencedSymbol.ContainingSymbol).TypeKind == TypeKind.Interface &&
Shared\Extensions\IMethodSymbolExtensions.cs (1)
17Contract.ThrowIfFalse(delegateType.TypeKind == TypeKind.Delegate);
Shared\Extensions\ISymbolExtensions.cs (2)
490if (typeSymbol.TypeKind == TypeKind.Class) 496else if (typeSymbol.TypeKind == TypeKind.Interface)
Shared\Extensions\ITypeSymbolExtensions.cs (2)
159typeSymbol.TypeKind == TypeKind.Interface) 196if (type.TypeKind == TypeKind.Interface &&
Shared\Extensions\SemanticModelExtensions.cs (1)
144if (namedType.TypeKind == TypeKind.Delegate ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (8)
87if (member.ContainingType.TypeKind == TypeKind.Interface) 158if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 196if (type.TypeKind == TypeKind.Interface) 299if (type.TypeKind == TypeKind.Interface) 337if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 347if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 364return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface 541TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (8)
177return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } && 185symbol.ContainingType.TypeKind == TypeKind.Interface) 224=> symbol is ITypeSymbol { TypeKind: TypeKind.Error }; 227=> symbol is ITypeSymbol { TypeKind: TypeKind.Module }; 230=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface }; 281=> symbol is { ContainingType.TypeKind: TypeKind.Module }; 305=> symbol is ITypeSymbol { TypeKind: TypeKind.Delegate }; 693if (!methods.Any(x => x.Name == WellKnownMemberNames.OnCompleted && x.ReturnsVoid && x.Parameters is [{ Type.TypeKind: TypeKind.Delegate }]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
192typeArg.TypeKind != TypeKind.Error &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (13)
43if (type is INamedTypeSymbol namedType && namedType.TypeKind == TypeKind.Interface && !allInterfaces.Contains(namedType)) 57=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract; 83=> symbol?.TypeKind == TypeKind.Module; 86=> symbol?.TypeKind == TypeKind.Interface; 89=> symbol?.TypeKind == TypeKind.Delegate; 92=> symbol?.TypeKind == TypeKind.FunctionPointer; 95=> symbol?.TypeKind == TypeKind.Struct; 189IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes(); 264switch (typeSymbol.TypeKind) 542if (t1.TypeKind != t2.TypeKind) 636if (type != null && type.IsValueType && type.TypeKind == TypeKind.Enum) 688if (type.TypeKind != TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (2)
83symbol = updatedContainingType.GetTypeMembers(symbol.Name, symbol.Arity).First(m => m.TypeKind == symbol.TypeKind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
149if (type.TypeKind == TypeKind.Array && typeArguments.IsEmpty) 158type.TypeKind == TypeKind.Pointer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
410symbol.GetSymbolType()?.TypeKind != TypeKind.Delegate)
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)
367SymbolCategory.Type => symbol is ITypeSymbol type && type.TypeKind == (TypeKind)_kind,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
407if (namedTypeSymbol.TypeKind == TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TupleTypeSymbolKey.cs (1)
22var isError = symbol.TupleUnderlyingType!.TypeKind == TypeKind.Error;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (2)
185property1.ContainingType.TypeKind == TypeKind.Interface) 195property2.ContainingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.cs (1)
247=> x.TypeKind switch
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (1)
512if (x.TypeKind == TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
192if (x.TypeKind == TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
38if (typeSymbol.TypeKind != TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
152if (namedType.TypeKind != TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
25namedType.TypeKind,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
130member.ContainingType is { TypeKind: TypeKind.Interface } interfaceBeingImplemented)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
498if (containingType?.TypeKind == TypeKind.Struct)
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
218if (ta.TypeKind == TypeKind.TypeParameter)
Microsoft.Gen.ContextualOptions (2)
Parser.cs (2)
82.Where(prop => prop.Type.TypeKind != TypeKind.Pointer) 83.Where(prop => prop.Type.TypeKind != TypeKind.FunctionPointer)
Microsoft.Gen.Logging (4)
Parsing\Parser.LogProperties.cs (2)
308|| (property.Type.TypeKind == TypeKind.Delegate) 338_allowedTypeKinds.Contains(symType.TypeKind) &&
Parsing\Parser.Records.cs (1)
121if (memberType.TypeKind == TypeKind.Delegate)
Parsing\Parser.TagProvider.cs (1)
161if (target.TypeKind == TypeKind.Interface)
Microsoft.Gen.Logging.Unit.Tests (1)
LogParserUtilitiesTests.cs (1)
155paramTypeMock.SetupGet(x => x.TypeKind).Returns(TypeKind.Class);
Microsoft.Gen.MetadataExtractor (4)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (4)
574returnType.TypeKind != TypeKind.Error) 625if (strongTypeSymbol.TypeKind == TypeKind.Class) 700kind = propertySymbol!.Type.TypeKind; 708kind = fieldSymbol!.Type.TypeKind;
Microsoft.Gen.Metrics (4)
Parser.cs (4)
574returnType.TypeKind != TypeKind.Error) 625if (strongTypeSymbol.TypeKind == TypeKind.Class) 700kind = propertySymbol!.Type.TypeKind; 708kind = fieldSymbol!.Type.TypeKind;
Microsoft.Gen.MetricsReports (4)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (4)
574returnType.TypeKind != TypeKind.Error) 625if (strongTypeSymbol.TypeKind == TypeKind.Class) 700kind = propertySymbol!.Type.TypeKind; 708kind = fieldSymbol!.Type.TypeKind;
Microsoft.Interop.ComInterfaceGenerator (6)
Analyzers\AddGeneratedComClassAnalyzer.cs (1)
42if (type.TypeKind != TypeKind.Class)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (2)
52if (type is not { TypeKind: TypeKind.Interface, IsComImport: true } 222public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type is { TypeKind: TypeKind.Array or TypeKind.Delegate } or { SpecialType: SpecialType.System_Array or SpecialType.System_Object };
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (1)
32if (typeSymbol.TypeKind != TypeKind.Interface)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
273if (methodSymbol.ReturnType is { TypeKind: TypeKind.Struct }
VtableIndexStubGenerator.cs (1)
133if (attrData.AttributeClass?.TypeKind is null or TypeKind.Error)
Microsoft.Interop.JavaScript.JSImportGenerator (2)
JSExportGenerator.cs (1)
161if (attrData.AttributeClass?.TypeKind is null or TypeKind.Error)
JSImportGenerator.cs (1)
136if (attrData.AttributeClass?.TypeKind is null or TypeKind.Error)
Microsoft.Interop.LibraryImportGenerator (2)
LibraryImportGenerator.cs (1)
190if (attrData.AttributeClass?.TypeKind is null or TypeKind.Error)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
273if (methodSymbol.ReturnType is { TypeKind: TypeKind.Struct }
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
132if (attrData.AttributeClass?.TypeKind is null or TypeKind.Error)
Microsoft.Interop.SourceGeneration (17)
BlittableTypeMarshallingInfoProvider.cs (1)
27if (type.TypeKind is TypeKind.Enum or TypeKind.Pointer or TypeKind.FunctionPointer
CustomMarshallingInfoHelper.cs (4)
29if (!(entryPointType.IsStatic && entryPointType.TypeKind == TypeKind.Class) 30&& entryPointType.TypeKind != TypeKind.Struct) 145if (!(entryPointType.IsStatic && entryPointType.TypeKind == TypeKind.Class) 146&& entryPointType.TypeKind != TypeKind.Struct)
ManagedTypeInfo.cs (6)
48if (type.TypeKind == TypeKind.Enum) 52if (type.TypeKind == TypeKind.Pointer) 56if (type.TypeKind == TypeKind.FunctionPointer) 60if (type.TypeKind == TypeKind.Array && type is IArrayTypeSymbol { IsSZArray: true } arraySymbol) 64if (type.TypeKind == TypeKind.Delegate) 68if (type.TypeKind == TypeKind.TypeParameter)
ManualTypeMarshallingHelper.cs (4)
364while (innerType.TypeKind is TypeKind.Array or TypeKind.Pointer) 388if (wrapperType.TypeKind == TypeKind.Pointer) 392else if (wrapperType.TypeKind == TypeKind.Array) 412if (marshallerType is { IsStatic: true, TypeKind: TypeKind.Class })
TypeSymbolExtensions.cs (2)
104if (type.TypeKind == TypeKind.TypeParameter && !type.IsReferenceType) 110if (type.TypeKind is TypeKind.Pointer or TypeKind.FunctionPointer)
Microsoft.ML.InternalCodeAnalyzer (1)
BaseTestClassAnalyzer.cs (1)
68if (namedType.TypeKind != TypeKind.Class)
Microsoft.VisualStudio.LanguageServices (35)
Implementation\ContainedLanguageRefactorNotifyService.cs (1)
77else if (symbol is INamedTypeSymbol && (symbol as INamedTypeSymbol).TypeKind == TypeKind.Class)
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (3)
90if (typeSymbol.TypeKind is TypeKind.Unknown or TypeKind.Error or TypeKind.TypeParameter || 180if (symbol.TypeKind == TypeKind.Delegate) 443return symbol is INamedTypeSymbol { TypeKind: TypeKind.Delegate }
Library\ObjectBrowser\AbstractListItemFactory.cs (3)
216if (namedTypeSymbol.TypeKind != TypeKind.Interface) 268if (typeSymbol.TypeKind == TypeKind.Interface) 275else if (typeSymbol.TypeKind != TypeKind.Module &&
Library\ObjectBrowser\Lists\MemberListItem.cs (1)
25if (fieldSymbol.ContainingType.TypeKind == TypeKind.Enum)
Library\ObjectBrowser\Lists\TypeListItem.cs (1)
14Kind = typeSymbol.TypeKind;
Library\ObjectBrowser\ObjectList.cs (2)
440if (typeSymbol.TypeKind == TypeKind.Module) 445if (typeSymbol.TypeKind == TypeKind.Interface && typeSymbol.Interfaces.IsEmpty)
Library\VsNavInfo\NavInfoFactory.cs (3)
81else if (typeSymbol.TypeKind == TypeKind.Pointer) 85else if (typeSymbol.TypeKind == TypeKind.Array) 97if (typeSymbol.TypeKind is TypeKind.Error or
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)
Progression\GraphBuilder.cs (7)
570switch (namedType.TypeKind) 608throw ExceptionUtilities.UnexpectedValue(namedType.TypeKind); 612node[RoslynGraphProperties.TypeKind] = namedType.TypeKind; 629node[RoslynGraphProperties.TypeKind] = method.ContainingType.TypeKind; 642if (field.ContainingType.TypeKind == TypeKind.Enum) 662node[RoslynGraphProperties.TypeKind] = property.ContainingType.TypeKind; 675node[RoslynGraphProperties.TypeKind] = eventSymbol.ContainingType.TypeKind;
Progression\GraphNodeIdCreation.cs (7)
78if (symbol.TypeKind == TypeKind.TypeParameter) 106if (underlyingType.TypeKind == TypeKind.Dynamic) 216while (pointerType.PointedAtType.TypeKind == TypeKind.Pointer) 242if (underlyingType.TypeKind == TypeKind.Dynamic) 246else if (underlyingType.TypeKind != TypeKind.TypeParameter) 275while (symbol.TypeKind == TypeKind.Array) 280while (symbol.TypeKind == TypeKind.Pointer)
Progression\GraphQueries\InheritedByGraphQuery.cs (2)
27if (namedType.TypeKind == TypeKind.Class) 38else if (namedType.TypeKind == TypeKind.Interface)
Progression\GraphQueries\InheritsGraphQuery.cs (1)
39else if (namedType.TypeKind == TypeKind.Interface && !namedType.OriginalDefinition.AllInterfaces.IsEmpty)
PullMemberUp\MainDialog\PullMemberUpDialogViewModel.cs (1)
73MemberSelectionViewModel.UpdateMembersBasedOnDestinationKind(_selectedDestination.Symbol.TypeKind);
Microsoft.VisualStudio.LanguageServices.CSharp (22)
CodeModel\CSharpCodeModelService.cs (9)
682if (typeSymbol.TypeKind == TypeKind.Unknown) 695if (typeSymbol.TypeKind == TypeKind.Array) 699else if (typeSymbol.TypeKind == TypeKind.Pointer) 704typeSymbol.TypeKind is TypeKind.Dynamic or 754if (typeSymbol.TypeKind is TypeKind.Class or 3711return typeSymbol.TypeKind == TypeKind.Class; 3715return typeSymbol.TypeKind == TypeKind.Interface; 3808return typeSymbol.TypeKind == TypeKind.Interface; 3822typeSymbol.TypeKind != TypeKind.Interface)
CodeModel\CSharpCodeModelService_Prototype.cs (1)
40if (namedType.TypeKind == TypeKind.Delegate)
ObjectBrowser\DescriptionBuilder.cs (11)
33Debug.Assert(typeSymbol.TypeKind == TypeKind.Delegate); 66switch (typeSymbol.TypeKind) 85Debug.Fail("Invalid type kind encountered: " + typeSymbol.TypeKind.ToString()); 94if (typeSymbol.TypeKind == TypeKind.Enum) 171typeSymbol.TypeKind != TypeKind.Interface) 177typeSymbol.TypeKind != TypeKind.Struct && 178typeSymbol.TypeKind != TypeKind.Enum && 179typeSymbol.TypeKind != TypeKind.Delegate) 238if (memberSymbol.ContainingType != null && memberSymbol.ContainingType.TypeKind == TypeKind.Interface) 253fieldSymbol.ContainingType.TypeKind == TypeKind.Enum) 470if (fieldSymbol.ContainingType.TypeKind != TypeKind.Enum)
Progression\CSharpProgressionLanguageService.cs (1)
118case IFieldSymbol f: return f.ContainingType.TypeKind == TypeKind.Enum ? null : f.Type;
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
GlyphExtensionsTests.cs (1)
234namedTypeMock.SetupGet(s => s.TypeKind).Returns(typeKind);
Microsoft.VisualStudio.LanguageServices.VisualBasic (30)
CodeModel\Extenders\GenericExtender.vb (4)
35Select Case typeSymbol.TypeKind 48Select Case typeSymbol.TypeKind 63Select Case typeSymbol.TypeKind 85Select Case typeSymbol.TypeKind
CodeModel\MethodXML\MethodXmlBuilder.vb (2)
372symbolOpt?.ContainingType?.TypeKind = TypeKind.Module Then 595If type.TypeKind = TypeKind.Array Then
CodeModel\VisualBasicCodeModelService.vb (10)
757If typeSymbol.TypeKind = TypeKind.Array Then 761If typeSymbol.TypeKind = TypeKind.Pointer Then 765If typeSymbol IsNot Nothing AndAlso Not typeSymbol.TypeKind = TypeKind.Error Then 770If typeSymbol.TypeKind = TypeKind.Enum Then 805If typeSymbol.TypeKind = TypeKind.Pointer Then 809If typeSymbol.TypeKind = TypeKind.TypeParameter Then 2907(symbol.Kind = SymbolKind.NamedType AndAlso DirectCast(symbol, INamedTypeSymbol).TypeKind = TypeKind.Module) OrElse 4247Return typeSymbol.TypeKind = TypeKind.Class 4249Return typeSymbol.TypeKind = TypeKind.Interface 4315Return typeSymbol.TypeKind = TypeKind.Interface
CodeModel\VisualBasicCodeModelService_Prototype.vb (1)
45If namedTypeSymbol.TypeKind = TypeKind.Delegate Then
ObjectBrowser\DescriptionBuilder.vb (12)
33Debug.Assert(typeSymbol.TypeKind = TypeKind.Delegate) 73Select Case typeSymbol.TypeKind 85Debug.Fail("Invalid type kind encountered: " & typeSymbol.TypeKind.ToString()) 100If typeSymbol.TypeKind = TypeKind.Class Then 111If typeSymbol.TypeKind = TypeKind.Enum Then 303If eventType IsNot Nothing AndAlso eventType.TypeKind = TypeKind.Delegate Then 338typeSymbol.TypeKind <> TypeKind.Interface Then 343typeSymbol.TypeKind <> TypeKind.Delegate AndAlso 344typeSymbol.TypeKind <> TypeKind.Module AndAlso 345typeSymbol.TypeKind <> TypeKind.Enum AndAlso 346typeSymbol.TypeKind <> TypeKind.Structure Then 353If memberSymbol.ContainingType IsNot Nothing And memberSymbol.ContainingType.TypeKind = TypeKind.Interface Then
Progression\VisualBasicProgressionLanguageService.vb (1)
82If symbol.Kind = SymbolKind.Field AndAlso symbol.ContainingType.TypeKind = TypeKind.Enum Then
Roslyn.Diagnostics.Analyzers (23)
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 (2)
82if (containingType.TypeKind != TypeKind.Struct) 112switch (type.TypeKind)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134switch (namedType.TypeKind)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
690=> methodSymbol.Parameters.Any(p => p.Type.TypeKind == TypeKind.Delegate);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
140if (symbol.TypeKind != TypeKind.Class)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
103if (operation.Type.TypeKind == TypeKind.Enum)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (3)
94typeSymbol.TypeKind == TypeKind.Error; 397if (type1.TypeKind == TypeKind.TypeParameter && 398type2.TypeKind == TypeKind.TypeParameter &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (5)
53switch (possibleBase.TypeKind) 56if (type.TypeKind == TypeKind.Interface) 99if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface) 114if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter) 352if (invocationTarget.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
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)
Roslyn.Diagnostics.CSharp.Analyzers (2)
PreferNullLiteral.cs (2)
57if (type.TypeKind == TypeKind.Pointer) 61else if (type.TypeKind == TypeKind.Error)
System.Text.Json.SourceGeneration (6)
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)
JsonSourceGenerator.Parser.cs (1)
554else if (type.TypeKind is TypeKind.Enum)
src\libraries\Common\src\SourceGenerators\TypeRef.cs (1)
21TypeKind = type.TypeKind;
Test.Utilities (18)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
690=> methodSymbol.Parameters.Any(p => p.Type.TypeKind == TypeKind.Delegate);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
140if (symbol.TypeKind != TypeKind.Class)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
103if (operation.Type.TypeKind == TypeKind.Enum)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (3)
94typeSymbol.TypeKind == TypeKind.Error; 397if (type1.TypeKind == TypeKind.TypeParameter && 398type2.TypeKind == TypeKind.TypeParameter &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (5)
53switch (possibleBase.TypeKind) 56if (type.TypeKind == TypeKind.Interface) 99if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface) 114if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter) 352if (invocationTarget.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
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)
Text.Analyzers (23)
EnumsShouldHavePluralNames.cs (1)
73if (symbol.TypeKind != TypeKind.Enum)
IdentifiersShouldBeSpelledCorrectly.cs (3)
341if (type.TypeKind == TypeKind.Interface) 494SymbolKind.Parameter => symbol.ContainingType.TypeKind == TypeKind.Delegate 514SymbolKind.Parameter => symbol.ContainingType.TypeKind == TypeKind.Delegate
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
134switch (namedType.TypeKind)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
690=> methodSymbol.Parameters.Any(p => p.Type.TypeKind == TypeKind.Delegate);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
140if (symbol.TypeKind != TypeKind.Class)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
103if (operation.Type.TypeKind == TypeKind.Enum)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (3)
94typeSymbol.TypeKind == TypeKind.Error; 397if (type1.TypeKind == TypeKind.TypeParameter && 398type2.TypeKind == TypeKind.TypeParameter &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (5)
53switch (possibleBase.TypeKind) 56if (type.TypeKind == TypeKind.Interface) 99if (!baseTypesOnly && candidateBaseType.TypeKind == TypeKind.Interface) 114if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter) 352if (invocationTarget.TypeKind == TypeKind.Interface)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
412namedType.TypeKind != TypeKind.Interface ||
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)