2 instantiations of SingleTypeDeclaration
Microsoft.CodeAnalysis.CSharp (2)
Declarations\DeclarationTreeBuilder.cs (2)
218return new SingleTypeDeclaration( 333SingleNamespaceOrTypeDeclaration decl = new SingleTypeDeclaration(
110 references to SingleTypeDeclaration
Microsoft.CodeAnalysis.CSharp (110)
Compilation\CSharpCompilation.cs (1)
5039foreach (SingleTypeDeclaration typeDecl in current.Declarations)
Compilation\SyntaxAndDeclarationManager.cs (1)
633if (current is not SingleTypeDeclaration singleType)
Declarations\DeclarationTable.cs (2)
314Func<SingleTypeDeclaration, bool> typePredicate, 351foreach (var typeDecl in mergedType.Declarations)
Declarations\DeclarationTreeBuilder.cs (48)
99public static bool CachesComputedMemberNames(SingleTypeDeclaration typeDeclaration) 206SingleTypeDeclaration.TypeDeclarationFlags declFlags = SingleTypeDeclaration.TypeDeclarationFlags.None; 216private static SingleNamespaceOrTypeDeclaration CreateImplicitClass(BoxedMemberNames memberNames, SyntaxReference container, SingleTypeDeclaration.TypeDeclarationFlags declFlags) 227children: ImmutableArray<SingleTypeDeclaration>.Empty, 248declFlags: (hasAwaitExpressions ? SingleTypeDeclaration.TypeDeclarationFlags.HasAwaitExpressions : SingleTypeDeclaration.TypeDeclarationFlags.None) | 249(isIterator ? SingleTypeDeclaration.TypeDeclarationFlags.IsIterator : SingleTypeDeclaration.TypeDeclarationFlags.None) | 250(hasReturnWithExpression ? SingleTypeDeclaration.TypeDeclarationFlags.HasReturnWithExpression : SingleTypeDeclaration.TypeDeclarationFlags.None) | 251SingleTypeDeclaration.TypeDeclarationFlags.IsSimpleProgram, 255children: ImmutableArray<SingleTypeDeclaration>.Empty, 270var scriptChildren = ArrayBuilder<SingleTypeDeclaration>.GetInstance(); 285scriptChildren.Add((SingleTypeDeclaration)decl); 291SingleTypeDeclaration.TypeDeclarationFlags declFlags = SingleTypeDeclaration.TypeDeclarationFlags.None; 322ImmutableArray<SingleTypeDeclaration> children, 324SingleTypeDeclaration.TypeDeclarationFlags declFlags) 683private SingleTypeDeclaration VisitTypeDeclaration(TypeDeclarationSyntax node, DeclarationKind kind) 686? SingleTypeDeclaration.TypeDeclarationFlags.HasAnyAttributes 687: SingleTypeDeclaration.TypeDeclarationFlags.None; 691declFlags |= SingleTypeDeclaration.TypeDeclarationFlags.HasBaseDeclarations; 703declFlags |= SingleTypeDeclaration.TypeDeclarationFlags.HasAnyNontypeMembers; 704declFlags |= SingleTypeDeclaration.TypeDeclarationFlags.HasPrimaryConstructor; 710declFlags |= SingleTypeDeclaration.TypeDeclarationFlags.AnyMemberHasAttributes; 783private ImmutableArray<SingleTypeDeclaration> VisitTypeChildren(TypeDeclarationSyntax node) 787return ImmutableArray<SingleTypeDeclaration>.Empty; 790var children = ArrayBuilder<SingleTypeDeclaration>.GetInstance(); 793var typeDecl = Visit(member) as SingleTypeDeclaration; 803? SingleTypeDeclaration.TypeDeclarationFlags.HasAnyAttributes 804: SingleTypeDeclaration.TypeDeclarationFlags.None; 812declFlags |= SingleTypeDeclaration.TypeDeclarationFlags.HasAnyNontypeMembers; 826children: ImmutableArray<SingleTypeDeclaration>.Empty, 835SingleTypeDeclaration.TypeDeclarationFlags declFlags = node.AttributeLists.Any() ? 836SingleTypeDeclaration.TypeDeclarationFlags.HasAnyAttributes : 837SingleTypeDeclaration.TypeDeclarationFlags.None; 841declFlags |= SingleTypeDeclaration.TypeDeclarationFlags.HasBaseDeclarations; 864children: ImmutableArray<SingleTypeDeclaration>.Empty, 885ref SingleTypeDeclaration.TypeDeclarationFlags declFlags) 892declFlags |= SingleTypeDeclaration.TypeDeclarationFlags.HasAnyNontypeMembers; 899declFlags |= SingleTypeDeclaration.TypeDeclarationFlags.AnyMemberHasAttributes; 915ref SingleTypeDeclaration.TypeDeclarationFlags declFlags, 958declFlags |= SingleTypeDeclaration.TypeDeclarationFlags.AnyMemberHasExtensionMethodSyntax; 963declFlags |= SingleTypeDeclaration.TypeDeclarationFlags.AnyMemberHasAttributes; 968declFlags |= SingleTypeDeclaration.TypeDeclarationFlags.HasAnyNontypeMembers; 973declFlags |= SingleTypeDeclaration.TypeDeclarationFlags.HasRequiredMembers;
Declarations\MergedNamespaceDeclaration.cs (11)
92ArrayBuilder<SingleTypeDeclaration> types = null; 101var asType = child as SingleTypeDeclaration; 107types = ArrayBuilder<SingleTypeDeclaration>.GetInstance(); 181static void addTypesToChildren(ArrayBuilder<SingleTypeDeclaration> types, bool allTypesHaveSameIdentity, ArrayBuilder<MergedNamespaceOrTypeDeclaration> children) 196var typeGroups = PooledDictionary<SingleTypeDeclaration.TypeDeclarationIdentity, object>.GetInstance(); 204if (existingValue is not ArrayBuilder<SingleTypeDeclaration> builder) 206builder = ArrayBuilder<SingleTypeDeclaration>.GetInstance(); 207builder.Add((SingleTypeDeclaration)existingValue); 221if (typeGroup is SingleTypeDeclaration t) 227var builder = (ArrayBuilder<SingleTypeDeclaration>)typeGroup;
Declarations\MergedTypeDeclaration.cs (14)
23private readonly ImmutableArray<SingleTypeDeclaration> _declarations; 27internal MergedTypeDeclaration(ImmutableArray<SingleTypeDeclaration> declarations) 33public ImmutableArray<SingleTypeDeclaration> Declarations 59foreach (var decl in _declarations) 122foreach (var decl in this.Declarations) 136foreach (var decl in this.Declarations) 150foreach (var decl in this.Declarations) 179foreach (var decl in Declarations) 188ArrayBuilder<SingleTypeDeclaration> nestedTypes = null; 190foreach (var decl in this.Declarations) 192foreach (var child in decl.Children) 194var asType = child as SingleTypeDeclaration; 199nestedTypes = ArrayBuilder<SingleTypeDeclaration>.GetInstance();
Declarations\SingleTypeDeclaration.cs (8)
23private readonly ImmutableArray<SingleTypeDeclaration> _children; 81ImmutableArray<SingleTypeDeclaration> children, 105public new ImmutableArray<SingleTypeDeclaration> Children 224private readonly SingleTypeDeclaration _decl; 226internal TypeDeclarationIdentity(SingleTypeDeclaration decl) 238var thisDecl = _decl; 239var otherDecl = other._decl; 274var thisDecl = _decl;
Symbols\NamespaceOrTypeSymbol.cs (1)
224foreach (var declaration in memberT.MergedDeclaration.Declarations)
Symbols\Source\SourceMemberContainerSymbol.cs (7)
239foreach (var singleDeclaration in declaration.Declarations) 398var decl = declaration.Declarations[i]; 472var singleDeclaration = declaration.Declarations[i]; 1019foreach (var declaration in declarations) 1099foreach (var declaration in this.declaration.Declarations) 3305foreach (var singleDecl in declaration.Declarations) 3504foreach (var decl in this.declaration.Declarations)
Symbols\Source\SourceNamedTypeSymbol.cs (4)
324foreach (var decl in declaration.Declarations) 383foreach (var decl in declaration.Declarations) 405foreach (var decl in declaration.Declarations) 1077foreach (var decl in this.declaration.Declarations)
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (8)
113var singleDeclaration = this.FirstDeclarationWithExplicitBases(); 159var singleDeclaration = this.FirstDeclarationWithExplicitBases(); 214foreach (var decl in this.declaration.Declarations) 241private SingleTypeDeclaration FirstDeclarationWithExplicitBases() 243foreach (var singleDeclaration in this.declaration.Declarations) 298foreach (var decl in this.declaration.Declarations) 426private static BaseListSyntax GetBaseListOpt(SingleTypeDeclaration decl) 438private Tuple<NamedTypeSymbol, ImmutableArray<NamedTypeSymbol>> MakeOneDeclaredBases(ConsList<TypeSymbol> newBasesBeingResolved, SingleTypeDeclaration decl, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (1)
52var decl = this.declaration.Declarations[0];
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (4)
19/// The corresponding <see cref="SingleTypeDeclaration"/>. 21private readonly SingleTypeDeclaration _declaration; 28internal SynthesizedSimpleProgramEntryPointSymbol(SourceMemberContainerTypeSymbol containingType, SingleTypeDeclaration declaration, BindingDiagnosticBag diagnostics) 62private static (DeclarationModifiers, Flags) MakeModifiersAndFlags(SourceMemberContainerTypeSymbol containingType, SingleTypeDeclaration declaration)