C# Класс ICSharpCode.NRefactory.CSharp.CSharpUtil

Показать файл Открыть проект

Открытые методы

Метод Описание
AreConditionsEqual ( Expression cond1, Expression cond2 ) : bool
GetInnerMostExpression ( Expression target ) : Expression
InvertCondition ( Expression condition ) : Expression

Inverts a boolean condition. Note: The condition object can be frozen (from AST) it's cloned internally.

IsRelationalOperator ( BinaryOperatorType op ) : bool

Returns true, if the specified operator is a relational operator

NegateConditionOperator ( BinaryOperatorType op ) : BinaryOperatorType

Get negation of the condition operator

NegateRelationalOperator ( BinaryOperatorType op ) : BinaryOperatorType

Get negation of the specified relational operator

Приватные методы

Метод Описание
AddParensForUnaryExpressionIfRequired ( Expression expression ) : Expression

When negating an expression this is required, otherwise you would end up with a or b -> !a or b

InvertConditionInternal ( Expression condition ) : Expression

Описание методов

AreConditionsEqual() публичный статический Метод

public static AreConditionsEqual ( Expression cond1, Expression cond2 ) : bool
cond1 Expression
cond2 Expression
Результат bool

GetInnerMostExpression() публичный статический Метод

public static GetInnerMostExpression ( Expression target ) : Expression
target Expression
Результат Expression

InvertCondition() публичный статический Метод

Inverts a boolean condition. Note: The condition object can be frozen (from AST) it's cloned internally.
public static InvertCondition ( Expression condition ) : Expression
condition Expression The condition to invert.
Результат Expression

IsRelationalOperator() публичный статический Метод

Returns true, if the specified operator is a relational operator
public static IsRelationalOperator ( BinaryOperatorType op ) : bool
op BinaryOperatorType
Результат bool

NegateConditionOperator() публичный статический Метод

Get negation of the condition operator
public static NegateConditionOperator ( BinaryOperatorType op ) : BinaryOperatorType
op BinaryOperatorType
Результат BinaryOperatorType

NegateRelationalOperator() публичный статический Метод

Get negation of the specified relational operator
public static NegateRelationalOperator ( BinaryOperatorType op ) : BinaryOperatorType
op BinaryOperatorType
Результат BinaryOperatorType