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