PowerShellAttributeSyntax Class

Represents an attribute or type constraint, [Parameter(Mandatory)] or [string].

public sealed class PowerShellAttributeSyntax : ShellSyntaxNode
Inheritance
ShellSyntaxNode PowerShellAttributeSyntax

Properties

NameDescription
Arguments
CloseBracketToken
CloseParenToken
IsTypeConstraintReturns true when the attribute has no argument list, making it a type constraint.
NameThe attribute or type name.
NameToken
OpenBracketToken
OpenParenToken

Arguments

Syntax.g.cs
public SeparatedSyntaxList<ShellExpressionSyntax> Arguments { get; }

No documentation is available.

CloseBracketToken

Syntax.g.cs
public SyntaxToken CloseBracketToken { get; }

Property value

SyntaxToken

No documentation is available.

CloseParenToken

Syntax.g.cs
public SyntaxToken CloseParenToken { get; }

Property value

SyntaxToken

No documentation is available.

Returns true when the attribute has no argument list, making it a type constraint.

public bool IsTypeConstraint { get; }

Property value

bool

The attribute or type name.

public string Name { get; }

Property value

string

NameToken

Syntax.g.cs
public SyntaxToken NameToken { get; }

Property value

SyntaxToken

No documentation is available.

OpenBracketToken

Syntax.g.cs
public SyntaxToken OpenBracketToken { get; }

Property value

SyntaxToken

No documentation is available.

OpenParenToken

Syntax.g.cs
public SyntaxToken OpenParenToken { get; }

Property value

SyntaxToken

No documentation is available.

Methods

NameDescription
Accept(ShellSyntaxVisitor)
Accept<TResult>(ShellSyntaxVisitor<TResult>)
Update(SyntaxToken, SyntaxToken, SyntaxToken, SeparatedSyntaxList<ShellExpressionSyntax>, SyntaxToken, SyntaxToken)Returns this node with the given parts, or itself when nothing changed.
WithArguments(SeparatedSyntaxList<ShellExpressionSyntax>)Returns this node with arguments in place of its PowerShellAttributeSyntax.Arguments.
WithCloseBracketToken(SyntaxToken)Returns this node with closeBracketToken in place of its PowerShellAttributeSyntax.CloseBracketToken.
WithCloseParenToken(SyntaxToken)Returns this node with closeParenToken in place of its PowerShellAttributeSyntax.CloseParenToken.
WithNameToken(SyntaxToken)Returns this node with nameToken in place of its PowerShellAttributeSyntax.NameToken.
WithOpenBracketToken(SyntaxToken)Returns this node with openBracketToken in place of its PowerShellAttributeSyntax.OpenBracketToken.
WithOpenParenToken(SyntaxToken)Returns this node with openParenToken in place of its PowerShellAttributeSyntax.OpenParenToken.

Accept overloads

Accept(ShellSyntaxVisitor)

Syntax.g.cs
public override void Accept(ShellSyntaxVisitor visitor)
Parameters
visitor ShellSyntaxVisitor

No documentation is available.

Accept<TResult>(ShellSyntaxVisitor<TResult>)

Syntax.g.cs
public override TResult? Accept<TResult>(ShellSyntaxVisitor<TResult> visitor)
Type parameters
TResult
Parameters
visitor ShellSyntaxVisitor<TResult>
Returns

TResult?

No documentation is available.

Update(SyntaxToken, SyntaxToken, SyntaxToken, SeparatedSyntaxList<ShellExpressionSyntax>, SyntaxToken, SyntaxToken)

Syntax.g.cs

Returns this node with the given parts, or itself when nothing changed.

public PowerShellAttributeSyntax Update(SyntaxToken openBracketToken, SyntaxToken nameToken, SyntaxToken openParenToken, SeparatedSyntaxList<ShellExpressionSyntax> arguments, SyntaxToken closeParenToken, SyntaxToken closeBracketToken)

Parameters

openBracketToken SyntaxToken
nameToken SyntaxToken
openParenToken SyntaxToken
arguments SeparatedSyntaxList<ShellExpressionSyntax>
closeParenToken SyntaxToken
closeBracketToken SyntaxToken

Returns

PowerShellAttributeSyntax

WithArguments(SeparatedSyntaxList<ShellExpressionSyntax>)

Syntax.g.cs

Returns this node with arguments in place of its PowerShellAttributeSyntax.Arguments.

WithCloseBracketToken(SyntaxToken)

Syntax.g.cs

Returns this node with closeBracketToken in place of its PowerShellAttributeSyntax.CloseBracketToken.

public PowerShellAttributeSyntax WithCloseBracketToken(SyntaxToken closeBracketToken)

Parameters

closeBracketToken SyntaxToken

Returns

PowerShellAttributeSyntax

WithCloseParenToken(SyntaxToken)

Syntax.g.cs

Returns this node with closeParenToken in place of its PowerShellAttributeSyntax.CloseParenToken.

public PowerShellAttributeSyntax WithCloseParenToken(SyntaxToken closeParenToken)

Parameters

closeParenToken SyntaxToken

Returns

PowerShellAttributeSyntax

WithNameToken(SyntaxToken)

Syntax.g.cs

Returns this node with nameToken in place of its PowerShellAttributeSyntax.NameToken.

public PowerShellAttributeSyntax WithNameToken(SyntaxToken nameToken)

Parameters

nameToken SyntaxToken

Returns

PowerShellAttributeSyntax

WithOpenBracketToken(SyntaxToken)

Syntax.g.cs

Returns this node with openBracketToken in place of its PowerShellAttributeSyntax.OpenBracketToken.

public PowerShellAttributeSyntax WithOpenBracketToken(SyntaxToken openBracketToken)

Parameters

openBracketToken SyntaxToken

Returns

PowerShellAttributeSyntax

WithOpenParenToken(SyntaxToken)

Syntax.g.cs

Returns this node with openParenToken in place of its PowerShellAttributeSyntax.OpenParenToken.

public PowerShellAttributeSyntax WithOpenParenToken(SyntaxToken openParenToken)

Parameters

openParenToken SyntaxToken

Returns

PowerShellAttributeSyntax