C# 클래스 ICSharpCode.NRefactory.CSharp.CSharpUtil

파일 보기 프로젝트 열기: 0xd4d/NRefactory

공개 메소드들

메소드 설명
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