PowerShellSwitchClauseSyntax Class

Represents one clause of a switch statement: a pattern and the script block it runs.

public sealed class PowerShellSwitchClauseSyntax : ShellSyntaxNode
Inheritance
ShellSyntaxNode PowerShellSwitchClauseSyntax

Properties

NameDescription
Body
Pattern
SeparatorToken
public PowerShellScriptBlockSyntax Body { get; }

No documentation is available.

public ShellSyntaxNode Pattern { get; }

Property value

ShellSyntaxNode

No documentation is available.

SeparatorToken

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

Property value

SyntaxToken

No documentation is available.

Methods

NameDescription
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.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 overloads

Update(ShellSyntaxNode, PowerShellScriptBlockSyntax)

PowerShellSwitchClauseSyntax.cs

The signature of version 3.0.0, from before PowerShellSwitchClauseSyntax.SeparatorToken was added; the separator is kept.

Update(ShellSyntaxNode, PowerShellScriptBlockSyntax, SyntaxToken)

Syntax.g.cs

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

WithBody(PowerShellScriptBlockSyntax)

Syntax.g.cs

WithPattern(ShellSyntaxNode)

Syntax.g.cs

Returns this node with pattern in place of its PowerShellSwitchClauseSyntax.Pattern.

public PowerShellSwitchClauseSyntax WithPattern(ShellSyntaxNode pattern)

WithSeparatorToken(SyntaxToken)

Syntax.g.cs

Returns this node with separatorToken in place of its PowerShellSwitchClauseSyntax.SeparatorToken.

public PowerShellSwitchClauseSyntax WithSeparatorToken(SyntaxToken separatorToken)

Parameters

separatorToken SyntaxToken

Returns

PowerShellSwitchClauseSyntax