C# 클래스 GSF.Parsing.BooleanExpression

Represents a boolean expression that can be parsed and executed at runtime.
Binary operators have the same level of precedence and are evaluated from right to left.
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf

공개 메소드들

메소드 설명
BooleanExpression ( string expressionText ) : System

Creates a new instance of the BooleanExpression class.

The default comparer for identifiers is StringComparer.OrdinalIgnoreCase.

BooleanExpression ( string expressionText, IEqualityComparer identifierComparer ) : System

Creates a new instance of the BooleanExpression class.

Evaluate ( ) : bool

Evaluates the expression using the current values of the variables.

TryGetVariable ( string identifier, Variable &variable ) : bool

Attempts to get the variable identified by the given identifier.

this ( string identifier ) : Variable

Gets the variable identified by the given identifier.

비공개 메소드들

메소드 설명
ParseExpression ( StringBuilder builder ) : Expression
ParseIdentifier ( StringBuilder builder ) : Expression
ParseSubexpression ( StringBuilder builder ) : Expression
ShedWhitespace ( StringBuilder builder ) : void

메소드 상세

BooleanExpression() 공개 메소드

Creates a new instance of the BooleanExpression class.
The default comparer for identifiers is StringComparer.OrdinalIgnoreCase.
public BooleanExpression ( string expressionText ) : System
expressionText string The expression text to be parsed as a boolean expression.
리턴 System

BooleanExpression() 공개 메소드

Creates a new instance of the BooleanExpression class.
public BooleanExpression ( string expressionText, IEqualityComparer identifierComparer ) : System
expressionText string The expression text to be parsed as a boolean expression.
identifierComparer IEqualityComparer Comparer used to compare identifiers.
리턴 System

Evaluate() 공개 메소드

Evaluates the expression using the current values of the variables.
public Evaluate ( ) : bool
리턴 bool

TryGetVariable() 공개 메소드

Attempts to get the variable identified by the given identifier.
public TryGetVariable ( string identifier, Variable &variable ) : bool
identifier string The identifier used to refer to the variable.
variable Variable The variable identified by the given identifier.
리턴 bool

this() 공개 메소드

Gets the variable identified by the given identifier.
public this ( string identifier ) : Variable
identifier string The identifier used to refer to the variable.
리턴 Variable