83 references to NamespaceKeyword
Microsoft.CodeAnalysis.CSharp (11)
Parser\LanguageParser.cs (8)
249Debug.Assert(this.CurrentToken.Kind == SyntaxKind.NamespaceKeyword); 250var namespaceToken = this.EatToken(SyntaxKind.NamespaceKeyword); 431case SyntaxKind.NamespaceKeyword: 699case SyntaxKind.NamespaceKeyword: 716else if (this.PeekToken(1).Kind == SyntaxKind.NamespaceKeyword) 1114else if (nextToken.Kind == SyntaxKind.NamespaceKeyword) 1319if (currentTokenKind == SyntaxKind.NamespaceKeyword) 2298if (this.CurrentToken.Kind == SyntaxKind.NamespaceKeyword)
SymbolDisplay\SymbolDisplayVisitor.cs (1)
129AddKeyword(SyntaxKind.NamespaceKeyword);
Syntax\SyntaxKindFacts.cs (2)
961return SyntaxKind.NamespaceKeyword; 1601case SyntaxKind.NamespaceKeyword:
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\KeywordRecommenders\NamespaceKeywordRecommender.cs (1)
16: base(SyntaxKind.NamespaceKeyword)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (69)
Generated\Syntax.Test.xml.Generated.cs (8)
461=> InternalSyntaxFactory.NamespaceDeclaration(new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.SyntaxToken>(), InternalSyntaxFactory.Token(SyntaxKind.NamespaceKeyword), GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.OpenBraceToken), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.ExternAliasDirectiveSyntax>(), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.UsingDirectiveSyntax>(), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.MemberDeclarationSyntax>(), InternalSyntaxFactory.Token(SyntaxKind.CloseBraceToken), null); 464=> InternalSyntaxFactory.FileScopedNamespaceDeclaration(new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.SyntaxToken>(), InternalSyntaxFactory.Token(SyntaxKind.NamespaceKeyword), GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.SemicolonToken), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.ExternAliasDirectiveSyntax>(), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.UsingDirectiveSyntax>(), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.MemberDeclarationSyntax>()); 2576Assert.Equal(SyntaxKind.NamespaceKeyword, node.NamespaceKeyword.Kind); 2595Assert.Equal(SyntaxKind.NamespaceKeyword, node.NamespaceKeyword.Kind); 10437=> SyntaxFactory.NamespaceDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.NamespaceKeyword), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.OpenBraceToken), new SyntaxList<ExternAliasDirectiveSyntax>(), new SyntaxList<UsingDirectiveSyntax>(), new SyntaxList<MemberDeclarationSyntax>(), SyntaxFactory.Token(SyntaxKind.CloseBraceToken), default(SyntaxToken)); 10440=> SyntaxFactory.FileScopedNamespaceDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.NamespaceKeyword), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.SemicolonToken), new SyntaxList<ExternAliasDirectiveSyntax>(), new SyntaxList<UsingDirectiveSyntax>(), new SyntaxList<MemberDeclarationSyntax>()); 12552Assert.Equal(SyntaxKind.NamespaceKeyword, node.NamespaceKeyword.Kind()); 12571Assert.Equal(SyntaxKind.NamespaceKeyword, node.NamespaceKeyword.Kind());
Parsing\AsyncParsingTests.cs (1)
2322N(SyntaxKind.NamespaceKeyword);
Parsing\DeclarationParsingTests.cs (4)
8510N(SyntaxKind.NamespaceKeyword); 8753N(SyntaxKind.NamespaceKeyword); 8800N(SyntaxKind.NamespaceKeyword); 8847N(SyntaxKind.NamespaceKeyword);
Parsing\FileModifierParsingTests.cs (6)
631N(SyntaxKind.NamespaceKeyword); 664N(SyntaxKind.NamespaceKeyword); 2251N(SyntaxKind.NamespaceKeyword); 2316N(SyntaxKind.NamespaceKeyword); 2379N(SyntaxKind.NamespaceKeyword); 2442N(SyntaxKind.NamespaceKeyword);
Parsing\SingleLineDeclarationParsingTests.cs (31)
47N(SyntaxKind.NamespaceKeyword); 76N(SyntaxKind.NamespaceKeyword); 108N(SyntaxKind.NamespaceKeyword); 145N(SyntaxKind.NamespaceKeyword); 176N(SyntaxKind.NamespaceKeyword); 204N(SyntaxKind.NamespaceKeyword); 229N(SyntaxKind.NamespaceKeyword); 259N(SyntaxKind.NamespaceKeyword); 292N(SyntaxKind.NamespaceKeyword); 320N(SyntaxKind.NamespaceKeyword); 345N(SyntaxKind.NamespaceKeyword); 368N(SyntaxKind.NamespaceKeyword); 376N(SyntaxKind.NamespaceKeyword); 402N(SyntaxKind.NamespaceKeyword); 410N(SyntaxKind.NamespaceKeyword); 437N(SyntaxKind.NamespaceKeyword); 445N(SyntaxKind.NamespaceKeyword); 472N(SyntaxKind.NamespaceKeyword); 482N(SyntaxKind.NamespaceKeyword); 514N(SyntaxKind.NamespaceKeyword); 537N(SyntaxKind.NamespaceKeyword); 576N(SyntaxKind.NamespaceKeyword); 599N(SyntaxKind.NamespaceKeyword); 636N(SyntaxKind.NamespaceKeyword); 659N(SyntaxKind.NamespaceKeyword); 691N(SyntaxKind.NamespaceKeyword); 713N(SyntaxKind.NamespaceKeyword); 744N(SyntaxKind.NamespaceKeyword); 775N(SyntaxKind.NamespaceKeyword); 809N(SyntaxKind.NamespaceKeyword); 831N(SyntaxKind.NamespaceKeyword);
Parsing\TopLevelStatementsParsingTests.cs (1)
310N(SyntaxKind.NamespaceKeyword);
Parsing\UsingDirectiveParsingTests.cs (8)
1240N(SyntaxKind.NamespaceKeyword); 1312N(SyntaxKind.NamespaceKeyword); 1387N(SyntaxKind.NamespaceKeyword); 1463N(SyntaxKind.NamespaceKeyword); 1547N(SyntaxKind.NamespaceKeyword); 2027N(SyntaxKind.NamespaceKeyword); 2102N(SyntaxKind.NamespaceKeyword); 3431N(SyntaxKind.NamespaceKeyword);
Syntax\SyntaxTreeTests.cs (10)
405N(SyntaxKind.NamespaceKeyword); 453N(SyntaxKind.NamespaceKeyword); 548N(SyntaxKind.NamespaceKeyword); 597N(SyntaxKind.NamespaceKeyword); 710N(SyntaxKind.NamespaceKeyword); 769N(SyntaxKind.NamespaceKeyword); 818N(SyntaxKind.NamespaceKeyword); 883N(SyntaxKind.NamespaceKeyword); 891N(SyntaxKind.NamespaceKeyword); 930N(SyntaxKind.NamespaceKeyword);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Rename\CSharpRenameRewriterLanguageService.cs (2)
383if (!isRenameLocation && symbol is INamespaceSymbol && token.GetPreviousToken().IsKind(SyntaxKind.NamespaceKeyword)) 402if (isRenameLocation && token.GetPreviousToken().IsKind(SyntaxKind.NamespaceKeyword))