Skip to content

Options

Sébastien Geiser edited this page Jan 21, 2019 · 22 revisions

ExpressionEvaluator has a set of options that can modify the way the evaluator works. Here is the list :

OptionCaseSensitiveEvaluationActive

Type : Boolean Default value : true

When true : The code evaluation is case sensitive :

Example :

// Works not
abs(-1) + SIN(3 * pi) - cOS(2 * pI)
// Must be written as this
Abs(-1) + Sin(3 * Pi) - Cos(2 * Pi)

When false : The code evaluation is case insensitive :

Example :

// Works
abs(-1) + SIN(3 * pi) - cOS(2 * pI)

OptionFluidPrefixingActive

Type : Boolean Default value : true

When true : Allow to prefix void methods with Fluid or Fluent :

Example :

// Works return 3
List("hello", "bye").FluidAdd("test").Count

When false : Disable the functionality :

Example :

// Generate an exception
List("hello", "bye").FluidAdd("test").Count

See Go fluid with a simple methods prefixing convention

OptionNewKeywordEvaluationActive

Type : Boolean Default value : true

When true : Allow to create objects with the new keyword :

Example :

// Works
new MyObject()

When false : new as a keyword is forbidden

Example :

// Generate an exception
new MyObject()

OptionNewFunctionEvaluationActive

Type : Boolean Default value : true

When true : Allow to create objects with the standard new() function :

Example :

// Works
new(typeof(MyObject))

When false : new as a standard function is forbidden

Example :

// Generate an exception
new(typeof(MyObject))

Table Of Content

Clone this wiki locally