Base:
property
Modifiers
Microsoft.CodeAnalysis.CSharp.Syntax.MemberDeclarationSyntax.Modifiers
20 references to Modifiers
Microsoft.CodeAnalysis.CSharp (13)
Syntax.xml.Main.Generated.cs (1)
1966
=> node.Update(VisitList(node.AttributeLists), VisitList(node.
Modifiers
), VisitToken(node.NamespaceKeyword), (NameSyntax?)Visit(node.Name) ?? throw new ArgumentNullException("name"), VisitToken(node.OpenBraceToken), VisitList(node.Externs), VisitList(node.Usings), VisitList(node.Members), VisitToken(node.CloseBraceToken), VisitToken(node.SemicolonToken));
Syntax.xml.Syntax.Generated.cs (11)
9611
if (attributeLists != this.AttributeLists || modifiers != this.
Modifiers
|| namespaceKeyword != this.NamespaceKeyword || name != this.Name || openBraceToken != this.OpenBraceToken || externs != this.Externs || usings != this.Usings || members != this.Members || closeBraceToken != this.CloseBraceToken || semicolonToken != this.SemicolonToken)
9622
public new NamespaceDeclarationSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.
Modifiers
, this.NamespaceKeyword, this.Name, this.OpenBraceToken, this.Externs, this.Usings, this.Members, this.CloseBraceToken, this.SemicolonToken);
9626
public new NamespaceDeclarationSyntax WithNamespaceKeyword(SyntaxToken namespaceKeyword) => Update(this.AttributeLists, this.
Modifiers
, namespaceKeyword, this.Name, this.OpenBraceToken, this.Externs, this.Usings, this.Members, this.CloseBraceToken, this.SemicolonToken);
9628
public new NamespaceDeclarationSyntax WithName(NameSyntax name) => Update(this.AttributeLists, this.
Modifiers
, this.NamespaceKeyword, name, this.OpenBraceToken, this.Externs, this.Usings, this.Members, this.CloseBraceToken, this.SemicolonToken);
9629
public NamespaceDeclarationSyntax WithOpenBraceToken(SyntaxToken openBraceToken) => Update(this.AttributeLists, this.
Modifiers
, this.NamespaceKeyword, this.Name, openBraceToken, this.Externs, this.Usings, this.Members, this.CloseBraceToken, this.SemicolonToken);
9631
public new NamespaceDeclarationSyntax WithExterns(SyntaxList<ExternAliasDirectiveSyntax> externs) => Update(this.AttributeLists, this.
Modifiers
, this.NamespaceKeyword, this.Name, this.OpenBraceToken, externs, this.Usings, this.Members, this.CloseBraceToken, this.SemicolonToken);
9633
public new NamespaceDeclarationSyntax WithUsings(SyntaxList<UsingDirectiveSyntax> usings) => Update(this.AttributeLists, this.
Modifiers
, this.NamespaceKeyword, this.Name, this.OpenBraceToken, this.Externs, usings, this.Members, this.CloseBraceToken, this.SemicolonToken);
9635
public new NamespaceDeclarationSyntax WithMembers(SyntaxList<MemberDeclarationSyntax> members) => Update(this.AttributeLists, this.
Modifiers
, this.NamespaceKeyword, this.Name, this.OpenBraceToken, this.Externs, this.Usings, members, this.CloseBraceToken, this.SemicolonToken);
9636
public NamespaceDeclarationSyntax WithCloseBraceToken(SyntaxToken closeBraceToken) => Update(this.AttributeLists, this.
Modifiers
, this.NamespaceKeyword, this.Name, this.OpenBraceToken, this.Externs, this.Usings, this.Members, closeBraceToken, this.SemicolonToken);
9637
public NamespaceDeclarationSyntax WithSemicolonToken(SyntaxToken semicolonToken) => Update(this.AttributeLists, this.
Modifiers
, this.NamespaceKeyword, this.Name, this.OpenBraceToken, this.Externs, this.Usings, this.Members, this.CloseBraceToken, semicolonToken);
9642
public new NamespaceDeclarationSyntax AddModifiers(params SyntaxToken[] items) => WithModifiers(this.
Modifiers
.AddRange(items));
Syntax\NamespaceDeclarationSyntax.cs (1)
22
=> this.Update(this.AttributeLists, this.
Modifiers
, namespaceKeyword, name, openBraceToken, externs, usings, members, closeBraceToken, semicolonToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
337
namespaceDeclaration.
Modifiers
,
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
337
namespaceDeclaration.
Modifiers
,
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (5)
Generated\Syntax.Test.xml.Generated.cs (2)
12995
Assert.Equal(default, node.
Modifiers
);
13004
var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.
Modifiers
).WithNamespaceKeyword(node.NamespaceKeyword).WithName(node.Name).WithOpenBraceToken(node.OpenBraceToken).WithExterns(node.Externs).WithUsings(node.Usings).WithMembers(node.Members).WithCloseBraceToken(node.CloseBraceToken).WithSemicolonToken(node.SemicolonToken);
Syntax\SyntaxListTests.cs (3)
246
Assert.True(declaration.
Modifiers
.Count == 0);
257
Assert.True(declaration.
Modifiers
.Count == 0);
262
Assert.True(declaration.
Modifiers
.Count == 1);