PowerShellSwitchClauseSyntax Class
Represents one clause of a switch statement: a pattern and the script block it runs.
public sealed class PowerShellSwitchClauseSyntax : ShellSyntaxNode- Inheritance
ShellSyntaxNodePowerShellSwitchClauseSyntax
Properties
| Name | Description |
|---|---|
| Body | |
| Pattern | |
| SeparatorToken |
Body
Syntax.g.csPattern
Syntax.g.csSeparatorToken
Syntax.g.csMethods
| Name | Description |
|---|---|
| Accept(ShellSyntaxVisitor) | |
| Accept<TResult>(ShellSyntaxVisitor<TResult>) | |
| Update(ShellSyntaxNode, PowerShellScriptBlockSyntax) | The signature of version 3.0.0, from before PowerShellSwitchClauseSyntax.SeparatorToken was added; the separator is kept. |
| Update(ShellSyntaxNode, PowerShellScriptBlockSyntax, SyntaxToken) | Returns this node with the given parts, or itself when nothing changed. |
| WithBody(PowerShellScriptBlockSyntax) | Returns this node with body in place of its PowerShellSwitchClauseSyntax.Body. |
| WithPattern(ShellSyntaxNode) | Returns this node with pattern in place of its PowerShellSwitchClauseSyntax.Pattern. |
| WithSeparatorToken(SyntaxToken) | Returns this node with separatorToken in place of its PowerShellSwitchClauseSyntax.SeparatorToken. |
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 overloads
Update(ShellSyntaxNode, PowerShellScriptBlockSyntax)
PowerShellSwitchClauseSyntax.csThe signature of version 3.0.0, from before PowerShellSwitchClauseSyntax.SeparatorToken was added; the separator is kept.
public PowerShellSwitchClauseSyntax Update(ShellSyntaxNode pattern, PowerShellScriptBlockSyntax body)Update(ShellSyntaxNode, PowerShellScriptBlockSyntax, SyntaxToken)
Syntax.g.csReturns this node with the given parts, or itself when nothing changed.
public PowerShellSwitchClauseSyntax Update(ShellSyntaxNode pattern, PowerShellScriptBlockSyntax body, SyntaxToken separatorToken)WithBody(PowerShellScriptBlockSyntax)
Syntax.g.csReturns this node with body in place of its PowerShellSwitchClauseSyntax.Body.
public PowerShellSwitchClauseSyntax WithBody(PowerShellScriptBlockSyntax body)WithPattern(ShellSyntaxNode)
Syntax.g.csReturns this node with pattern in place of its PowerShellSwitchClauseSyntax.Pattern.
public PowerShellSwitchClauseSyntax WithPattern(ShellSyntaxNode pattern)WithSeparatorToken(SyntaxToken)
Syntax.g.csReturns this node with separatorToken in place of its PowerShellSwitchClauseSyntax.SeparatorToken.
public PowerShellSwitchClauseSyntax WithSeparatorToken(SyntaxToken separatorToken)