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