51 references to Declarations
Microsoft.CodeAnalysis.CSharp (51)
Compilation\CSharpCompilation.cs (1)
5039
foreach (SingleTypeDeclaration typeDecl in current.
Declarations
)
Declarations\DeclarationTable.cs (1)
351
foreach (var typeDecl in mergedType.
Declarations
)
Declarations\MergedTypeDeclaration.cs (14)
106
return this.
Declarations
[0].Kind;
114
return this.
Declarations
[0].Arity;
122
foreach (var decl in this.
Declarations
)
136
foreach (var decl in this.
Declarations
)
150
foreach (var decl in this.
Declarations
)
162
LexicalSortKey sortKey = new LexicalSortKey(
Declarations
[0].NameLocation, compilation);
163
for (var i = 1; i <
Declarations
.Length; i++)
165
sortKey = LexicalSortKey.First(sortKey, new LexicalSortKey(
Declarations
[i].NameLocation, compilation));
175
if (
Declarations
.Length == 1)
176
return OneOrMany.Create(
Declarations
[0].NameLocation);
178
var builder = ArrayBuilder<SourceLocation>.GetInstance(
Declarations
.Length);
179
foreach (var decl in
Declarations
)
190
foreach (var decl in this.
Declarations
)
246
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 (22)
231
Debug.Assert(containingSymbol is NamespaceSymbol { IsGlobalNamespace: true } || !declaration.
Declarations
.Any(static d => d.IsSimpleProgram));
239
foreach (var singleDeclaration in declaration.
Declarations
)
393
var partCount = declaration.
Declarations
.Length;
398
var decl = declaration.
Declarations
[i];
410
mods, allowedModifiers, declaration.
Declarations
[i].NameLocation, diagnostics,
453
: ErrorCode.ERR_DuplicateNameInNS, declaration.
Declarations
[i].NameLocation, this.Name, this.ContainingSymbol);
462
diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass, declaration.
Declarations
[i].NameLocation, this.ContainingSymbol, this.Name);
472
var singleDeclaration = declaration.
Declarations
[i];
862
private SyntaxTree? AssociatedSyntaxTree => IsFileLocal ? declaration.
Declarations
[0].Location.SourceTree : null;
918
var kind = this.declaration.
Declarations
[0].Kind;
927
return this.declaration.
Declarations
[0].Kind == DeclarationKind.ImplicitClass;
935
return this.declaration.
Declarations
[0].Kind == DeclarationKind.Record;
943
return this.declaration.
Declarations
[0].Kind == DeclarationKind.RecordStruct;
992
=> declaration.
Declarations
[0].NameLocation;
1013
var declarations = declaration.
Declarations
;
1099
foreach (var declaration in this.declaration.
Declarations
)
1119
if (declaration.
Declarations
.Length >= 1 && position == declaration.
Declarations
[0].Location.SourceSpan.Start)
1406
hasDeclaredMembers = declaration.
Declarations
.Any(static decl => decl.HasRequiredMembers);
1879
var tree = declaration.
Declarations
[0].SyntaxReference.SyntaxTree;
3305
foreach (var singleDecl in declaration.
Declarations
)
3504
foreach (var decl in this.declaration.
Declarations
)
Symbols\Source\SourceNamedTypeSymbol.cs (6)
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
)
1719
if (this.declaration.
Declarations
.All(d => d.IsSimpleProgram))
1780
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)
386
var leftTree = possibleFileLocalType.MergedDeclaration.
Declarations
[0].Location.SourceTree;