Namespace Albatross.Expression.Operations
Classes
And
Infix AND operation.
Operand Count: 2
Operands
- Operand1 : any
- Operand2 : any
The input operands are converted to boolean. See the ConvertToBoolean(Object) method for the conversion logic
Output Type: Boolean
Usage: 3 > 2 and 2 > 1
Precedance: 30
Array
Prefix operation that create an object array
Operand Count: 0 to infinite
Operand Type: Any
Output Type: System.Collections.Generic.List<T> where T is Object
Usage: @(1, 2, 3, 4, 5)
Avg
Prefix operation that return the average of a set of numbers
Operand Count: 0 to infinite
Operand Type: number, if the operand count is 1, it can be an array
Output Type: double
Usage: avg(1, 2, 3, 4, 5) or avg(@(1, 2, 3, 4, 5))
Note: null value will not be counted, therefore avg(null, 2, 2, 2) should be 6/3 = 2 not 6/4 = 1.5; It will return null if the count is 0.
Coalesce
Prefix operation that return the first non null operand
Operand Count: 1 to infinite
Operand Type: any
Example: Coalesce(null, 1, 2, 3) will return 1
ComparisonInfixOperation
CreateDate
Prefix operation that create an date
Operand Count: 3
Operands
- year : double
- month : double
- day : double
Operand Type: int
Output Type: System.DateTime
Usage: CreateDate(2018, 1, 31)
CurrentApp
Prefix operation that returns the current app domain friendly name
Operand Count: 0
Output Type: string
CurrentMachine
Prefix operation that returns the current machine host name
Operand Count: 0
Output Type: string
CurrentUser
Prefix operation that returns the current windows user name>
Operand Count: 0
Output Type: string
Date
Prefix operation that convert input to date. The operand is converted to text first and parsed to a datetime object
Operand Count: 1
Operands
- input : any
Output Type: System.DateTime
Divide
Infix operation that perform divide
Operand Count: 2
Operands
- Operrand1 : double
- Operrand2 : double
Output Type: double
Equal
Infix operation that perform an equal check
Operand Count: 2
Operands
- Operrand1 : double
- Operrand2 : double
Output Type: double
Format
Prefix operation that will take an input and C# format string and produced a formatted string
GreaterEqual
Infix GreaterEqual operation.
Operand Count: 2
Operands
- Operand1 : any
- Operand2 : any
Output Type: Boolean
Usage: 3 >= 2
Precedance: 50
GreaterThan
Infix GreaterThan operation.
Operand Count: 2
Operands
- Operand1 : any
- Operand2 : any
Output Type: Boolean
Usage: 3 > 2
Precedance: 50
If
Prefix if operation
Operand Count: 2 or 3
Operands
- condition: any
- result when true: any
- result when false, if omitted, will be default to null: any
Output Type: any
Usage: if( 3 > 2, "OK", "No")
IsBlank
Prefix operation to check if the input IsBlank
Operand Type: any
Null, empty string and string with only white space are considered as blank
Left
Prefix operation that return the substring of the input text with the specified length and start index of 0
Operand Count: 2
Operands
- input: string
- count: double
Output Type: string
Usage: Left("test", 1) should return "t"
Len
LessEqual
LessThan
Max
Min
Minus
Mod
Infix operation that perform an mod operation
Operand Count: 2
Operands
- Operrand1 : double
- Operrand2 : double
Output Type: double
Month
MonthName
Multiply
Infix operation that perform an multiply operation
Operand Count: 2
Operands
- Operrand1 : double
- Operrand2 : double
Output Type: double
Negative
Not
NotEqual
Now
Or
Infix OR operation.
Operand Count: 2
Operands
- Operand1 : any
- Operand2 : any
Output Type: Boolean
Usage: 3 > 2 or 2 > 1
Precedance: 20
PadLeft
PadRight
Pi
Plus
Infix operation that perform an plus operation
Operand Count: 2
Operands
- Operrand1 : double
- Operrand2 : double
Output Type: double
Positive
Power
Infix operation that perform an power operation
Operand Count: 2
Operands
- base : double
- operand : double
Output Type: double