Table of Contents

Class SwitchExpression

Namespace
ICSharpCode.Decompiler.CSharp.Syntax
Assembly
ICSharpCode.Decompiler.dll

Expression switch { SwitchSections }

public class SwitchExpression : Expression, IAnnotatable, IFreezable, INode, ICloneable
Inheritance
SwitchExpression
Implements
Inherited Members
Extension Methods

Constructors

SwitchExpression()

public SwitchExpression()

Fields

SwitchKeywordRole

public static readonly TokenRole SwitchKeywordRole

Field Value

TokenRole

SwitchSectionRole

public static readonly Role<SwitchExpressionSection> SwitchSectionRole

Field Value

Role<SwitchExpressionSection>

Properties

Expression

public Expression Expression { get; set; }

Property Value

Expression

LBraceToken

public CSharpTokenNode LBraceToken { get; }

Property Value

CSharpTokenNode

RBraceToken

public CSharpTokenNode RBraceToken { get; }

Property Value

CSharpTokenNode

SwitchSections

public AstNodeCollection<SwitchExpressionSection> SwitchSections { get; }

Property Value

AstNodeCollection<SwitchExpressionSection>

SwitchToken

public CSharpTokenNode SwitchToken { get; }

Property Value

CSharpTokenNode

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)

Parameters

other AstNode
match Match

Returns

bool