111 references to DeclarationKind
Microsoft.CodeAnalysis.CSharp (111)
Compilation\CSharpCompilation.cs (3)
4851if (current.Kind == DeclarationKind.Namespace) 4891if (_includeMember || _includeType || child.Kind == DeclarationKind.Namespace) 4959if (declaration.Kind == DeclarationKind.Namespace)
Declarations\Declaration.cs (1)
67public abstract DeclarationKind Kind { get; }
Declarations\DeclarationKind.cs (9)
31internal static DeclarationKind ToDeclarationKind(this SyntaxKind kind) 35case SyntaxKind.ClassDeclaration: return DeclarationKind.Class; 36case SyntaxKind.InterfaceDeclaration: return DeclarationKind.Interface; 37case SyntaxKind.StructDeclaration: return DeclarationKind.Struct; 40return DeclarationKind.Namespace; 41case SyntaxKind.EnumDeclaration: return DeclarationKind.Enum; 42case SyntaxKind.DelegateDeclaration: return DeclarationKind.Delegate; 43case SyntaxKind.RecordDeclaration: return DeclarationKind.Record; 44case SyntaxKind.RecordStructDeclaration: return DeclarationKind.RecordStruct;
Declarations\DeclarationTable.cs (4)
200private static readonly Predicate<Declaration> s_isNamespacePredicate = d => d.Kind == DeclarationKind.Namespace; 201private static readonly Predicate<Declaration> s_isTypePredicate = d => d.Kind != DeclarationKind.Namespace; 334if (current.Kind == DeclarationKind.Namespace) 365if (includeMember || includeType || childNamespaceOrType.Kind == DeclarationKind.Namespace)
Declarations\DeclarationTreeBuilder.cs (29)
104DeclarationKind.Namespace => throw ExceptionUtilities.Unreachable(), 107DeclarationKind.Delegate => false, 109DeclarationKind.Class or 110DeclarationKind.Interface or 111DeclarationKind.Struct or 112DeclarationKind.Enum or 113DeclarationKind.Script or 114DeclarationKind.Submission or 115DeclarationKind.ImplicitClass or 116DeclarationKind.Record or 117DeclarationKind.RecordStruct => true, 219kind: DeclarationKind.ImplicitClass, 244kind: DeclarationKind.Class, 279if (decl.Kind == DeclarationKind.Namespace) 334kind: _isSubmission ? DeclarationKind.Submission : DeclarationKind.Script, 658return VisitTypeDeclaration(node, DeclarationKind.Class); 663return VisitTypeDeclaration(node, DeclarationKind.Struct); 668return VisitTypeDeclaration(node, DeclarationKind.Interface); 675SyntaxKind.RecordDeclaration => DeclarationKind.Record, 676SyntaxKind.RecordStructDeclaration => DeclarationKind.RecordStruct, 683private SingleTypeDeclaration VisitTypeDeclaration(TypeDeclarationSyntax node, DeclarationKind kind) 755if (modifier.IsKind(SyntaxKind.StaticKeyword) && kind == DeclarationKind.Class) 759else if (modifier.IsKind(SyntaxKind.ReadOnlyKeyword) && kind is DeclarationKind.Struct or DeclarationKind.RecordStruct) 763else if (modifier.IsKind(SyntaxKind.RefKeyword) && kind is DeclarationKind.Struct or DeclarationKind.RecordStruct) 818kind: DeclarationKind.Delegate, 856kind: DeclarationKind.Enum,
Declarations\MergedNamespaceDeclaration.cs (2)
38public override DeclarationKind Kind 42return DeclarationKind.Namespace;
Declarations\MergedTypeDeclaration.cs (1)
102public override DeclarationKind Kind
Declarations\SingleNamespaceDeclaration.cs (2)
26public override DeclarationKind Kind 30return DeclarationKind.Namespace;
Declarations\SingleTypeDeclaration.cs (6)
19private readonly DeclarationKind _kind; 73DeclarationKind kind, 86Debug.Assert(kind != DeclarationKind.Namespace); 97public override DeclarationKind Kind 263if (thisDecl._kind == DeclarationKind.Enum || thisDecl._kind == DeclarationKind.Delegate)
Symbols\EnumConversions.cs (11)
13internal static TypeKind ToTypeKind(this DeclarationKind kind) 17case DeclarationKind.Class: 18case DeclarationKind.Script: 19case DeclarationKind.ImplicitClass: 20case DeclarationKind.Record: 23case DeclarationKind.Submission: 26case DeclarationKind.Delegate: 29case DeclarationKind.Enum: 32case DeclarationKind.Interface: 35case DeclarationKind.Struct: 36case DeclarationKind.RecordStruct:
Symbols\Source\ImplicitNamedTypeSymbol.cs (3)
24Debug.Assert(declaration.Kind == DeclarationKind.ImplicitClass || 25declaration.Kind == DeclarationKind.Submission || 26declaration.Kind == DeclarationKind.Script);
Symbols\Source\SourceMemberContainerSymbol.cs (15)
918var kind = this.declaration.Declarations[0].Kind; 919return kind == DeclarationKind.Script || kind == DeclarationKind.Submission; 927return this.declaration.Declarations[0].Kind == DeclarationKind.ImplicitClass; 935return this.declaration.Declarations[0].Kind == DeclarationKind.Record; 943return this.declaration.Declarations[0].Kind == DeclarationKind.RecordStruct; 1500if (_lazyMembersDictionary != null || declaration.MemberNames.Contains(name) || declaration.Kind is DeclarationKind.Record or DeclarationKind.RecordStruct) 1928if (declaration.Kind != DeclarationKind.Record && 1929declaration.Kind != DeclarationKind.RecordStruct) 4161if (declaration.Kind is not (DeclarationKind.Record or DeclarationKind.RecordStruct) && declaredMembersAndInitializers.PrimaryConstructor is null) 4169if (declaration.Kind is not (DeclarationKind.Record or DeclarationKind.RecordStruct)) 4213bool isRecordClass = declaration.Kind == DeclarationKind.Record;
Symbols\Source\SourceNamedTypeSymbol.cs (7)
78case DeclarationKind.Struct: 79case DeclarationKind.Interface: 80case DeclarationKind.Enum: 81case DeclarationKind.Delegate: 82case DeclarationKind.Class: 83case DeclarationKind.Record: 84case DeclarationKind.RecordStruct:
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (3)
128if (declaration.Kind == DeclarationKind.Record) 370if (declaration.Kind is DeclarationKind.Record or DeclarationKind.RecordStruct)
Symbols\Source\SourceNamespaceSymbol.cs (11)
404case DeclarationKind.Namespace: 407case DeclarationKind.Struct: 408case DeclarationKind.Interface: 409case DeclarationKind.Enum: 410case DeclarationKind.Delegate: 411case DeclarationKind.Class: 412case DeclarationKind.Record: 413case DeclarationKind.RecordStruct: 416case DeclarationKind.Script: 417case DeclarationKind.Submission: 418case DeclarationKind.ImplicitClass:
Syntax\TypeDeclarationSyntax.cs (4)
52internal static SyntaxKind GetTypeDeclarationKeywordKind(DeclarationKind kind) 56case DeclarationKind.Class: 58case DeclarationKind.Struct: 60case DeclarationKind.Interface: