ShellUnaryExpressionSyntax Class
Represents a prefix expression such as -x, !$a, or the conditional test -f file, and the postfix increment forms i++ and i--.
public sealed class ShellUnaryExpressionSyntax : ShellExpressionSyntax- Inheritance
ShellExpressionSyntaxShellUnaryExpressionSyntax
Properties
| Name | Description |
|---|---|
| IsPostfix | Returns true when the operator follows the operand, as in i++. |
| Operand | |
| OperatorText | The operator text, whichever side it is on. |
| PostfixOperatorToken | |
| PrefixOperatorToken |
IsPostfix
ShellUnaryExpressionSyntax.csOperand
Syntax.g.csOperatorText
ShellUnaryExpressionSyntax.csPostfixOperatorToken
Syntax.g.csPrefixOperatorToken
Syntax.g.csMethods
| Name | Description |
|---|---|
| Accept(ShellSyntaxVisitor) | |
| Accept<TResult>(ShellSyntaxVisitor<TResult>) | |
| Update(SyntaxToken, ShellExpressionSyntax, SyntaxToken) | Returns this node with the given parts, or itself when nothing changed. |
| WithOperand(ShellExpressionSyntax) | Returns this node with operand in place of its ShellUnaryExpressionSyntax.Operand. |
| WithPostfixOperatorToken(SyntaxToken) | Returns this node with postfixOperatorToken in place of its ShellUnaryExpressionSyntax.PostfixOperatorToken. |
| WithPrefixOperatorToken(SyntaxToken) | Returns this node with prefixOperatorToken in place of its ShellUnaryExpressionSyntax.PrefixOperatorToken. |
Accept overloads
Accept(ShellSyntaxVisitor)
Syntax.g.cspublic override void Accept(ShellSyntaxVisitor visitor)Parameters
visitorShellSyntaxVisitor
No documentation is available.
Accept<TResult>(ShellSyntaxVisitor<TResult>)
Syntax.g.cspublic override TResult? Accept<TResult>(ShellSyntaxVisitor<TResult> visitor)No documentation is available.
Update(SyntaxToken, ShellExpressionSyntax, SyntaxToken)
Syntax.g.csReturns this node with the given parts, or itself when nothing changed.
public ShellUnaryExpressionSyntax Update(SyntaxToken prefixOperatorToken, ShellExpressionSyntax operand, SyntaxToken postfixOperatorToken)Parameters
prefixOperatorTokenSyntaxTokenoperandShellExpressionSyntaxpostfixOperatorTokenSyntaxToken
Returns
WithOperand(ShellExpressionSyntax)
Syntax.g.csReturns this node with operand in place of its ShellUnaryExpressionSyntax.Operand.
public ShellUnaryExpressionSyntax WithOperand(ShellExpressionSyntax operand)WithPostfixOperatorToken(SyntaxToken)
Syntax.g.csReturns this node with postfixOperatorToken in place of its ShellUnaryExpressionSyntax.PostfixOperatorToken.
public ShellUnaryExpressionSyntax WithPostfixOperatorToken(SyntaxToken postfixOperatorToken)WithPrefixOperatorToken(SyntaxToken)
Syntax.g.csReturns this node with prefixOperatorToken in place of its ShellUnaryExpressionSyntax.PrefixOperatorToken.
public ShellUnaryExpressionSyntax WithPrefixOperatorToken(SyntaxToken prefixOperatorToken)