Class IfElseStatement
- Namespace
- ICSharpCode.Decompiler.CSharp.Syntax
- Assembly
- ICSharpCode.Decompiler.dll
if (Condition) TrueStatement else FalseStatement
public class IfElseStatement : Statement, IAnnotatable, IFreezable, INode, ICloneable
- Inheritance
-
IfElseStatement
- Implements
- Inherited Members
- Extension Methods
Constructors
IfElseStatement()
public IfElseStatement()
IfElseStatement(Expression, Statement, Statement)
public IfElseStatement(Expression condition, Statement trueStatement, Statement falseStatement = null)
Parameters
condition
ExpressiontrueStatement
StatementfalseStatement
Statement
Fields
ConditionRole
public static readonly Role<Expression> ConditionRole
Field Value
ElseKeywordRole
public static readonly TokenRole ElseKeywordRole
Field Value
FalseRole
public static readonly Role<Statement> FalseRole
Field Value
IfKeywordRole
public static readonly TokenRole IfKeywordRole
Field Value
TrueRole
public static readonly Role<Statement> TrueRole
Field Value
Properties
Condition
public Expression Condition { get; set; }
Property Value
ElseToken
public CSharpTokenNode ElseToken { get; }
Property Value
FalseStatement
public Statement FalseStatement { get; set; }
Property Value
IfToken
public CSharpTokenNode IfToken { get; }
Property Value
LParToken
public CSharpTokenNode LParToken { get; }
Property Value
RParToken
public CSharpTokenNode RParToken { get; }
Property Value
TrueStatement
public Statement TrueStatement { get; set; }
Property Value
Methods
AcceptVisitor(IAstVisitor)
public override void AcceptVisitor(IAstVisitor visitor)
Parameters
visitor
IAstVisitor
AcceptVisitor<T>(IAstVisitor<T>)
public override T AcceptVisitor<T>(IAstVisitor<T> visitor)
Parameters
visitor
IAstVisitor<T>
Returns
- T
Type Parameters
T
AcceptVisitor<T, S>(IAstVisitor<T, S>, T)
public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)
Parameters
visitor
IAstVisitor<T, S>data
T
Returns
- S
Type Parameters
T
S
DoMatch(AstNode, Match)
protected override bool DoMatch(AstNode other, Match match)