PowerShellFunctionDefinitionSyntax Class

Represents a function, filter, or workflow definition.

public sealed class PowerShellFunctionDefinitionSyntax : ShellStatementSyntax
Inheritance
ShellStatementSyntax PowerShellFunctionDefinitionSyntax

Properties

NameDescription
Body
CloseParenToken
IsFilterReturns true for a filter, which runs its body once per pipeline item.
Keyword
NameThe definition name.
NameToken
OpenParenToken
Parameters
public PowerShellScriptBlockSyntax Body { get; }

No documentation is available.

CloseParenToken

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

Property value

SyntaxToken

No documentation is available.

Returns true for a filter, which runs its body once per pipeline item.

public bool IsFilter { get; }

Property value

bool

public SyntaxToken Keyword { get; }

Property value

SyntaxToken

No documentation is available.

The definition name.

public string Name { get; }

Property value

string

NameToken

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

Property value

SyntaxToken

No documentation is available.

OpenParenToken

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

Property value

SyntaxToken

No documentation is available.

Parameters

Syntax.g.cs

No documentation is available.

Methods

NameDescription
Accept(ShellSyntaxVisitor)
Accept<TResult>(ShellSyntaxVisitor<TResult>)
Update(SyntaxToken, SyntaxToken, SyntaxToken, SeparatedSyntaxList<PowerShellParameterSyntax>, SyntaxToken, PowerShellScriptBlockSyntax)Returns this node with the given parts, or itself when nothing changed.
WithBody(PowerShellScriptBlockSyntax)Returns this node with body in place of its PowerShellFunctionDefinitionSyntax.Body.
WithCloseParenToken(SyntaxToken)Returns this node with closeParenToken in place of its PowerShellFunctionDefinitionSyntax.CloseParenToken.
WithKeyword(SyntaxToken)Returns this node with keyword in place of its PowerShellFunctionDefinitionSyntax.Keyword.
WithNameToken(SyntaxToken)Returns this node with nameToken in place of its PowerShellFunctionDefinitionSyntax.NameToken.
WithOpenParenToken(SyntaxToken)Returns this node with openParenToken in place of its PowerShellFunctionDefinitionSyntax.OpenParenToken.
WithParameters(SeparatedSyntaxList<PowerShellParameterSyntax>)Returns this node with parameters in place of its PowerShellFunctionDefinitionSyntax.Parameters.

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<PowerShellParameterSyntax>, SyntaxToken, PowerShellScriptBlockSyntax)

Syntax.g.cs

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

WithBody(PowerShellScriptBlockSyntax)

Syntax.g.cs

WithCloseParenToken(SyntaxToken)

Syntax.g.cs

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

public PowerShellFunctionDefinitionSyntax WithCloseParenToken(SyntaxToken closeParenToken)

Parameters

closeParenToken SyntaxToken

Returns

PowerShellFunctionDefinitionSyntax

WithKeyword(SyntaxToken)

Syntax.g.cs

Returns this node with keyword in place of its PowerShellFunctionDefinitionSyntax.Keyword.

WithNameToken(SyntaxToken)

Syntax.g.cs

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

public PowerShellFunctionDefinitionSyntax WithNameToken(SyntaxToken nameToken)

WithOpenParenToken(SyntaxToken)

Syntax.g.cs

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

public PowerShellFunctionDefinitionSyntax WithOpenParenToken(SyntaxToken openParenToken)

Parameters

openParenToken SyntaxToken

Returns

PowerShellFunctionDefinitionSyntax

WithParameters(SeparatedSyntaxList<PowerShellParameterSyntax>)

Syntax.g.cs