CmdIfStatementSyntax Class

Represents an if statement in its errorlevel, defined, exist, or comparison form.

public sealed class CmdIfStatementSyntax : ShellStatementSyntax
Inheritance
ShellStatementSyntax CmdIfStatementSyntax

Properties

NameDescription
Body
CaseInsensitiveToken
Condition
ElseClause
IfKeyword
IsCaseInsensitiveReturns true when the comparison ignores case.
IsNegatedReturns true when the condition is negated.
NotKeyword
public ShellStatementSyntax Body { get; }

Property value

ShellStatementSyntax

No documentation is available.

CaseInsensitiveToken

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

Property value

SyntaxToken

No documentation is available.

Condition

Syntax.g.cs
public ShellExpressionSyntax Condition { get; }

Property value

ShellExpressionSyntax

No documentation is available.

ElseClause

Syntax.g.cs
public CmdElseClauseSyntax? ElseClause { get; }

Property value

CmdElseClauseSyntax?

No documentation is available.

IfKeyword

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

Property value

SyntaxToken

No documentation is available.

IsCaseInsensitive

CmdIfStatementSyntax.cs

Returns true when the comparison ignores case.

public bool IsCaseInsensitive { get; }

Property value

bool

Returns true when the condition is negated.

public bool IsNegated { get; }

Property value

bool

NotKeyword

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

Property value

SyntaxToken

No documentation is available.

Methods

NameDescription
Accept(ShellSyntaxVisitor)
Accept<TResult>(ShellSyntaxVisitor<TResult>)
Update(SyntaxToken, SyntaxToken, SyntaxToken, ShellExpressionSyntax, ShellStatementSyntax, CmdElseClauseSyntax?)Returns this node with the given parts, or itself when nothing changed.
WithBody(ShellStatementSyntax)Returns this node with body in place of its CmdIfStatementSyntax.Body.
WithCaseInsensitiveToken(SyntaxToken)Returns this node with caseInsensitiveToken in place of its CmdIfStatementSyntax.CaseInsensitiveToken.
WithCondition(ShellExpressionSyntax)Returns this node with condition in place of its CmdIfStatementSyntax.Condition.
WithElseClause(CmdElseClauseSyntax?)Returns this node with elseClause in place of its CmdIfStatementSyntax.ElseClause.
WithIfKeyword(SyntaxToken)Returns this node with ifKeyword in place of its CmdIfStatementSyntax.IfKeyword.
WithNotKeyword(SyntaxToken)Returns this node with notKeyword in place of its CmdIfStatementSyntax.NotKeyword.

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, ShellExpressionSyntax, ShellStatementSyntax, CmdElseClauseSyntax?)

Syntax.g.cs

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

public CmdIfStatementSyntax Update(SyntaxToken ifKeyword, SyntaxToken caseInsensitiveToken, SyntaxToken notKeyword, ShellExpressionSyntax condition, ShellStatementSyntax body, CmdElseClauseSyntax? elseClause)

Parameters

ifKeyword SyntaxToken
caseInsensitiveToken SyntaxToken
notKeyword SyntaxToken
condition ShellExpressionSyntax
body ShellStatementSyntax
elseClause CmdElseClauseSyntax?

Returns

CmdIfStatementSyntax

WithBody(ShellStatementSyntax)

Syntax.g.cs

Returns this node with body in place of its CmdIfStatementSyntax.Body.

WithCaseInsensitiveToken(SyntaxToken)

Syntax.g.cs

Returns this node with caseInsensitiveToken in place of its CmdIfStatementSyntax.CaseInsensitiveToken.

public CmdIfStatementSyntax WithCaseInsensitiveToken(SyntaxToken caseInsensitiveToken)

Parameters

caseInsensitiveToken SyntaxToken

Returns

CmdIfStatementSyntax

WithCondition(ShellExpressionSyntax)

Syntax.g.cs

Returns this node with condition in place of its CmdIfStatementSyntax.Condition.

public CmdIfStatementSyntax WithCondition(ShellExpressionSyntax condition)

WithElseClause(CmdElseClauseSyntax?)

Syntax.g.cs

Returns this node with elseClause in place of its CmdIfStatementSyntax.ElseClause.

public CmdIfStatementSyntax WithElseClause(CmdElseClauseSyntax? elseClause)

Parameters

elseClause CmdElseClauseSyntax?

Returns

CmdIfStatementSyntax

WithIfKeyword(SyntaxToken)

Syntax.g.cs

Returns this node with ifKeyword in place of its CmdIfStatementSyntax.IfKeyword.

public CmdIfStatementSyntax WithIfKeyword(SyntaxToken ifKeyword)

Parameters

ifKeyword SyntaxToken

Returns

CmdIfStatementSyntax

WithNotKeyword(SyntaxToken)

Syntax.g.cs

Returns this node with notKeyword in place of its CmdIfStatementSyntax.NotKeyword.

public CmdIfStatementSyntax WithNotKeyword(SyntaxToken notKeyword)

Parameters

notKeyword SyntaxToken

Returns

CmdIfStatementSyntax