50 references to Declarations
Microsoft.CodeAnalysis.CSharp (50)
Compilation\CSharpCompilation.cs (1)
5082
foreach (SingleTypeDeclaration typeDecl in current.
Declarations
)
Declarations\DeclarationTable.cs (1)
351
foreach (var typeDecl in mergedType.
Declarations
)
Declarations\MergedTypeDeclaration.cs (15)
107
return this.
Declarations
[0].Kind;
115
return this.
Declarations
[0].Arity;
123
foreach (var decl in this.
Declarations
)
137
foreach (var decl in this.
Declarations
)
151
foreach (var decl in this.
Declarations
)
165
foreach (var decl in this.
Declarations
)
177
LexicalSortKey sortKey = new LexicalSortKey(
Declarations
[0].NameLocation, compilation);
178
for (var i = 1; i <
Declarations
.Length; i++)
180
sortKey = LexicalSortKey.First(sortKey, new LexicalSortKey(
Declarations
[i].NameLocation, compilation));
190
if (
Declarations
.Length == 1)
191
return OneOrMany.Create(
Declarations
[0].NameLocation);
193
var builder = ArrayBuilder<SourceLocation>.GetInstance(
Declarations
.Length);
194
foreach (var decl in
Declarations
)
205
foreach (var decl in this.
Declarations
)
261
var names = UnionCollection<string>.Create(this.
Declarations
, d => d.MemberNames.Value);
Symbols\NamespaceOrTypeSymbol.cs (2)
223
Debug.Assert(memberT.MergedDeclaration.
Declarations
.SelectAsArray(decl => decl.NameLocation).SequenceEqual(memberT.Locations));
224
foreach (var declaration in memberT.MergedDeclaration.
Declarations
)
Symbols\Source\SourceMemberContainerSymbol.cs (20)
230
Debug.Assert(containingSymbol is NamespaceSymbol { IsGlobalNamespace: true } || !declaration.
Declarations
.Any(static d => d.IsSimpleProgram));
238
foreach (var singleDeclaration in declaration.
Declarations
)
400
var partCount = declaration.
Declarations
.Length;
405
var decl = declaration.
Declarations
[i];
417
mods, allowedModifiers, declaration.
Declarations
[i].NameLocation, diagnostics,
460
: ErrorCode.ERR_DuplicateNameInNS, declaration.
Declarations
[i].NameLocation, this.Name, this.ContainingSymbol);
469
diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass, declaration.
Declarations
[i].NameLocation, this.ContainingSymbol, this.Name);
479
var singleDeclaration = declaration.
Declarations
[i];
870
private SyntaxTree? AssociatedSyntaxTree => IsFileLocal ? declaration.
Declarations
[0].Location.SourceTree : null;
926
var kind = this.declaration.
Declarations
[0].Kind;
935
return this.declaration.
Declarations
[0].Kind == DeclarationKind.ImplicitClass;
943
return this.declaration.
Declarations
[0].Kind == DeclarationKind.Record;
951
return this.declaration.
Declarations
[0].Kind == DeclarationKind.RecordStruct;
1000
=> declaration.
Declarations
[0].NameLocation;
1021
var declarations = declaration.
Declarations
;
1107
foreach (var declaration in this.declaration.
Declarations
)
1127
if (declaration.
Declarations
.Length >= 1 && position == declaration.
Declarations
[0].Location.SourceSpan.Start)
1417
hasDeclaredMembers = declaration.
Declarations
.Any(static decl => decl.HasRequiredMembers);
1899
var tree = declaration.
Declarations
[0].SyntaxReference.SyntaxTree;
Symbols\Source\SourceNamedTypeSymbol.cs (6)
327
foreach (var decl in declaration.
Declarations
)
386
foreach (var decl in declaration.
Declarations
)
408
foreach (var decl in declaration.
Declarations
)
1081
foreach (var decl in this.declaration.
Declarations
)
1738
if (this.declaration.
Declarations
.All(d => d.IsSimpleProgram))
1814
return this.declaration.
Declarations
.Any(static d => d.IsSimpleProgram);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (3)
214
foreach (var decl in this.declaration.
Declarations
)
243
foreach (var singleDeclaration in this.declaration.
Declarations
)
298
foreach (var decl in this.declaration.
Declarations
)
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (1)
52
var decl = this.declaration.
Declarations
[0];
Symbols\Source\SourceNamespaceSymbol.cs (1)
387
var leftTree = possibleFileLocalType.MergedDeclaration.
Declarations
[0].Location.SourceTree;