Lean  $LEAN_TAG$
QuantConnect.BinaryComparison Class Reference

Enumeration class defining binary comparisons and providing access to expressions and functions capable of evaluating a particular comparison for any type. If a particular type does not implement a binary comparison than an exception will be thrown. More...

Public Member Functions

bool Evaluate< T > (T left, T right)
 Evaluates the specified left and right according to this BinaryComparison More...
 
Func< T, T, bool > GetEvaluator< T > ()
 Gets a function capable of performing this BinaryComparison More...
 
Expression< Func< T, T, bool > > GetExpression< T > ()
 Gets an expression representing this BinaryComparison More...
 
BinaryComparison FlipOperands ()
 Flips the logic ordering of the comparison's operands. For example, LessThan is converted into GreaterThan More...
 
override string ToString ()
 Returns a string that represents the current object. More...
 

Static Public Member Functions

static BinaryComparison FromExpressionType (ExpressionType type)
 Gets the BinaryComparison matching the provided type More...
 

Static Public Attributes

static readonly BinaryComparison Equal = new BinaryComparison(ExpressionType.Equal)
 Gets the BinaryComparison equivalent of ExpressionType.Equal More...
 
static readonly BinaryComparison NotEqual = new BinaryComparison(ExpressionType.NotEqual)
 Gets the BinaryComparison equivalent of ExpressionType.NotEqual More...
 
static readonly BinaryComparison LessThan = new BinaryComparison(ExpressionType.LessThan)
 Gets the BinaryComparison equivalent of ExpressionType.LessThan More...
 
static readonly BinaryComparison GreaterThan = new BinaryComparison(ExpressionType.GreaterThan)
 Gets the BinaryComparison equivalent of ExpressionType.GreaterThan More...
 
static readonly BinaryComparison LessThanOrEqual = new BinaryComparison(ExpressionType.LessThanOrEqual)
 Gets the BinaryComparison equivalent of ExpressionType.LessThanOrEqual More...
 
static readonly BinaryComparison GreaterThanOrEqual = new BinaryComparison(ExpressionType.GreaterThanOrEqual)
 Gets the BinaryComparison equivalent of ExpressionType.GreaterThanOrEqual More...
 

Properties

ExpressionType Type [get]
 Gets the expression type defining the binary comparison. More...
 

Detailed Description

Enumeration class defining binary comparisons and providing access to expressions and functions capable of evaluating a particular comparison for any type. If a particular type does not implement a binary comparison than an exception will be thrown.

Definition at line 27 of file BinaryComparison.cs.

Member Function Documentation

◆ FromExpressionType()

static BinaryComparison QuantConnect.BinaryComparison.FromExpressionType ( ExpressionType  type)
static

Gets the BinaryComparison matching the provided type

Definition at line 62 of file BinaryComparison.cs.

Here is the caller graph for this function:

◆ Evaluate< T >()

bool QuantConnect.BinaryComparison.Evaluate< T > ( left,
right 
)

Evaluates the specified left and right according to this BinaryComparison

◆ GetEvaluator< T >()

Func<T, T, bool> QuantConnect.BinaryComparison.GetEvaluator< T > ( )

Gets a function capable of performing this BinaryComparison

◆ GetExpression< T >()

Expression<Func<T, T, bool> > QuantConnect.BinaryComparison.GetExpression< T > ( )

Gets an expression representing this BinaryComparison

◆ FlipOperands()

BinaryComparison QuantConnect.BinaryComparison.FlipOperands ( )

Flips the logic ordering of the comparison's operands. For example, LessThan is converted into GreaterThan

Definition at line 109 of file BinaryComparison.cs.

◆ ToString()

override string QuantConnect.BinaryComparison.ToString ( )

Returns a string that represents the current object.

Returns
A string that represents the current object.

Definition at line 130 of file BinaryComparison.cs.

Member Data Documentation

◆ Equal

readonly BinaryComparison QuantConnect.BinaryComparison.Equal = new BinaryComparison(ExpressionType.Equal)
static

Gets the BinaryComparison equivalent of ExpressionType.Equal

Definition at line 32 of file BinaryComparison.cs.

◆ NotEqual

readonly BinaryComparison QuantConnect.BinaryComparison.NotEqual = new BinaryComparison(ExpressionType.NotEqual)
static

Gets the BinaryComparison equivalent of ExpressionType.NotEqual

Definition at line 37 of file BinaryComparison.cs.

◆ LessThan

readonly BinaryComparison QuantConnect.BinaryComparison.LessThan = new BinaryComparison(ExpressionType.LessThan)
static

Gets the BinaryComparison equivalent of ExpressionType.LessThan

Definition at line 42 of file BinaryComparison.cs.

◆ GreaterThan

readonly BinaryComparison QuantConnect.BinaryComparison.GreaterThan = new BinaryComparison(ExpressionType.GreaterThan)
static

Gets the BinaryComparison equivalent of ExpressionType.GreaterThan

Definition at line 47 of file BinaryComparison.cs.

◆ LessThanOrEqual

readonly BinaryComparison QuantConnect.BinaryComparison.LessThanOrEqual = new BinaryComparison(ExpressionType.LessThanOrEqual)
static

Gets the BinaryComparison equivalent of ExpressionType.LessThanOrEqual

Definition at line 52 of file BinaryComparison.cs.

◆ GreaterThanOrEqual

readonly BinaryComparison QuantConnect.BinaryComparison.GreaterThanOrEqual = new BinaryComparison(ExpressionType.GreaterThanOrEqual)
static

Gets the BinaryComparison equivalent of ExpressionType.GreaterThanOrEqual

Definition at line 57 of file BinaryComparison.cs.

Property Documentation

◆ Type

ExpressionType QuantConnect.BinaryComparison.Type
get

Gets the expression type defining the binary comparison.

Definition at line 80 of file BinaryComparison.cs.


The documentation for this class was generated from the following file: