Table of Contents

Class OperatorDeclaration

Namespace
ICSharpCode.Decompiler.CSharp.Syntax
Assembly
ICSharpCode.Decompiler.dll
public class OperatorDeclaration : EntityDeclaration, IAnnotatable, IFreezable, INode, ICloneable
Inheritance
OperatorDeclaration
Implements
Inherited Members
Extension Methods

Constructors

OperatorDeclaration()

public OperatorDeclaration()

Fields

AdditionRole

public static readonly TokenRole AdditionRole

Field Value

TokenRole

BitwiseAndRole

public static readonly TokenRole BitwiseAndRole

Field Value

TokenRole

BitwiseOrRole

public static readonly TokenRole BitwiseOrRole

Field Value

TokenRole

CheckedKeywordRole

public static readonly TokenRole CheckedKeywordRole

Field Value

TokenRole

DecrementRole

public static readonly TokenRole DecrementRole

Field Value

TokenRole

DivisionRole

public static readonly TokenRole DivisionRole

Field Value

TokenRole

EqualityRole

public static readonly TokenRole EqualityRole

Field Value

TokenRole

ExclusiveOrRole

public static readonly TokenRole ExclusiveOrRole

Field Value

TokenRole

ExplicitRole

public static readonly TokenRole ExplicitRole

Field Value

TokenRole

FalseRole

public static readonly TokenRole FalseRole

Field Value

TokenRole

GreaterThanOrEqualRole

public static readonly TokenRole GreaterThanOrEqualRole

Field Value

TokenRole

GreaterThanRole

public static readonly TokenRole GreaterThanRole

Field Value

TokenRole

ImplicitRole

public static readonly TokenRole ImplicitRole

Field Value

TokenRole

IncrementRole

public static readonly TokenRole IncrementRole

Field Value

TokenRole

InequalityRole

public static readonly TokenRole InequalityRole

Field Value

TokenRole

LeftShiftRole

public static readonly TokenRole LeftShiftRole

Field Value

TokenRole

LessThanOrEqualRole

public static readonly TokenRole LessThanOrEqualRole

Field Value

TokenRole

LessThanRole

public static readonly TokenRole LessThanRole

Field Value

TokenRole

LogicalNotRole

public static readonly TokenRole LogicalNotRole

Field Value

TokenRole

ModulusRole

public static readonly TokenRole ModulusRole

Field Value

TokenRole

MultiplyRole

public static readonly TokenRole MultiplyRole

Field Value

TokenRole

OnesComplementRole

public static readonly TokenRole OnesComplementRole

Field Value

TokenRole

OperatorKeywordRole

public static readonly TokenRole OperatorKeywordRole

Field Value

TokenRole

RightShiftRole

public static readonly TokenRole RightShiftRole

Field Value

TokenRole

SubtractionRole

public static readonly TokenRole SubtractionRole

Field Value

TokenRole

TrueRole

public static readonly TokenRole TrueRole

Field Value

TokenRole

UnsignedRightShiftRole

public static readonly TokenRole UnsignedRightShiftRole

Field Value

TokenRole

Properties

Body

public BlockStatement Body { get; set; }

Property Value

BlockStatement

LParToken

public CSharpTokenNode LParToken { get; }

Property Value

CSharpTokenNode

Name

public override string Name { get; set; }

Property Value

string

OperatorToken

public CSharpTokenNode OperatorToken { get; }

Property Value

CSharpTokenNode

OperatorType

public OperatorType OperatorType { get; set; }

Property Value

OperatorType

OperatorTypeToken

public CSharpTokenNode OperatorTypeToken { get; }

Property Value

CSharpTokenNode

Parameters

public AstNodeCollection<ParameterDeclaration> Parameters { get; }

Property Value

AstNodeCollection<ParameterDeclaration>

PrivateImplementationType

Gets/Sets the type reference of the interface that is explicitly implemented. Null node if this member is not an explicit interface implementation.

public AstType PrivateImplementationType { get; set; }

Property Value

AstType

RParToken

public CSharpTokenNode RParToken { get; }

Property Value

CSharpTokenNode

SymbolKind

public override SymbolKind SymbolKind { get; }

Property Value

SymbolKind

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

GetName(OperatorType?)

Gets the method name for the operator type. ("op_Addition", "op_Implicit", etc.)

public static string GetName(OperatorType? type)

Parameters

type OperatorType?

Returns

string

GetOperatorType(string)

Gets the operator type from the method name, or null, if the method does not represent one of the known operator types.

public static OperatorType? GetOperatorType(string methodName)

Parameters

methodName string

Returns

OperatorType?

GetRole(OperatorType)

public static TokenRole GetRole(OperatorType type)

Parameters

type OperatorType

Returns

TokenRole

GetToken(OperatorType)

Gets the token for the operator type ("+", "implicit", etc.). Does not include the "checked" modifier.

public static string GetToken(OperatorType type)

Parameters

type OperatorType

Returns

string

IsChecked(OperatorType)

Gets whether the operator type is a C# 11 "operator checked".

public static bool IsChecked(OperatorType type)

Parameters

type OperatorType

Returns

bool