Expressions¶
- class Expression¶
A server side expression.
- static Expression ConstantDouble (IConnection connection, Double value)¶
A constant value of double precision floating point type.
- Parameters:
- Game Scenes:
All
- static Expression ConstantFloat (IConnection connection, Single value)¶
A constant value of single precision floating point type.
- Parameters:
- Game Scenes:
All
- static Expression ConstantInt (IConnection connection, Int32 value)¶
A constant value of integer type.
- Parameters:
- Game Scenes:
All
- static Expression ConstantBool (IConnection connection, Boolean value)¶
A constant value of boolean type.
- Parameters:
- Game Scenes:
All
- static Expression ConstantString (IConnection connection, String value)¶
A constant value of string type.
- Parameters:
- Game Scenes:
All
- static Expression Call (IConnection connection, KRPC.Schema.KRPC.ProcedureCall call)¶
An RPC call.
- Parameters:
- Game Scenes:
All
- static Expression Equal (IConnection connection, Expression arg0, Expression arg1)¶
Equality comparison.
- Parameters:
- Game Scenes:
All
- static Expression NotEqual (IConnection connection, Expression arg0, Expression arg1)¶
Inequality comparison.
- Parameters:
- Game Scenes:
All
- static Expression GreaterThan (IConnection connection, Expression arg0, Expression arg1)¶
Greater than numerical comparison.
- Parameters:
- Game Scenes:
All
- static Expression GreaterThanOrEqual (IConnection connection, Expression arg0, Expression arg1)¶
Greater than or equal numerical comparison.
- Parameters:
- Game Scenes:
All
- static Expression LessThan (IConnection connection, Expression arg0, Expression arg1)¶
Less than numerical comparison.
- Parameters:
- Game Scenes:
All
- static Expression LessThanOrEqual (IConnection connection, Expression arg0, Expression arg1)¶
Less than or equal numerical comparison.
- Parameters:
- Game Scenes:
All
- static Expression And (IConnection connection, Expression arg0, Expression arg1)¶
Boolean and operator.
- Parameters:
- Game Scenes:
All
- static Expression Or (IConnection connection, Expression arg0, Expression arg1)¶
Boolean or operator.
- Parameters:
- Game Scenes:
All
- static Expression ExclusiveOr (IConnection connection, Expression arg0, Expression arg1)¶
Boolean exclusive-or operator.
- Parameters:
- Game Scenes:
All
- static Expression Not (IConnection connection, Expression arg)¶
Boolean negation operator.
- Parameters:
- Game Scenes:
All
- static Expression Add (IConnection connection, Expression arg0, Expression arg1)¶
Numerical addition.
- Parameters:
- Game Scenes:
All
- static Expression Subtract (IConnection connection, Expression arg0, Expression arg1)¶
Numerical subtraction.
- Parameters:
- Game Scenes:
All
- static Expression Multiply (IConnection connection, Expression arg0, Expression arg1)¶
Numerical multiplication.
- Parameters:
- Game Scenes:
All
- static Expression Divide (IConnection connection, Expression arg0, Expression arg1)¶
Numerical division.
- Parameters:
- Game Scenes:
All
- static Expression Modulo (IConnection connection, Expression arg0, Expression arg1)¶
Numerical modulo operator.
- Parameters:
- Returns:
The remainder of arg0 divided by arg1
- Game Scenes:
All
- static Expression Power (IConnection connection, Expression arg0, Expression arg1)¶
Numerical power operator.
- Parameters:
- Returns:
arg0 raised to the power of arg1, with type of arg0
- Game Scenes:
All
- static Expression LeftShift (IConnection connection, Expression arg0, Expression arg1)¶
Bitwise left shift.
- Parameters:
- Game Scenes:
All
- static Expression RightShift (IConnection connection, Expression arg0, Expression arg1)¶
Bitwise right shift.
- Parameters:
- Game Scenes:
All
- static Expression Cast (IConnection connection, Expression arg, Type type)¶
Perform a cast to the given type.
- Parameters:
type – Type to cast the argument to.
- Game Scenes:
All
- static Expression Parameter (IConnection connection, String name, Type type)¶
A named parameter of type double.
- Parameters:
name – The name of the parameter.
type – The type of the parameter.
- Returns:
A named parameter.
- Game Scenes:
All
- static Expression Function (IConnection connection, IList<Expression> parameters, Expression body)¶
A function.
- Parameters:
parameters – The parameters of the function.
body – The body of the function.
- Returns:
A function.
- Game Scenes:
All
- static Expression Invoke (IConnection connection, Expression function, IDictionary<String, Expression> args)¶
A function call.
- Parameters:
function – The function to call.
args – The arguments to call the function with.
- Returns:
A function call.
- Game Scenes:
All
- static Expression CreateTuple (IConnection connection, IList<Expression> elements)¶
Construct a tuple.
- Parameters:
elements – The elements.
- Returns:
The tuple.
- Game Scenes:
All
- static Expression CreateList (IConnection connection, IList<Expression> values)¶
Construct a list.
- Parameters:
values – The value. Should all be of the same type.
- Returns:
The list.
- Game Scenes:
All
- static Expression CreateSet (IConnection connection, ISet<Expression> values)¶
Construct a set.
- Parameters:
values – The values. Should all be of the same type.
- Returns:
The set.
- Game Scenes:
All
- static Expression CreateDictionary (IConnection connection, IList<Expression> keys, IList<Expression> values)¶
Construct a dictionary, from a list of corresponding keys and values.
- Parameters:
keys – The keys. Should all be of the same type.
values – The values. Should all be of the same type.
- Returns:
The dictionary.
- Game Scenes:
All
- static Expression ToList (IConnection connection, Expression arg)¶
Convert a collection to a list.
- Parameters:
arg – The collection.
- Returns:
The collection as a list.
- Game Scenes:
All
- static Expression ToSet (IConnection connection, Expression arg)¶
Convert a collection to a set.
- Parameters:
arg – The collection.
- Returns:
The collection as a set.
- Game Scenes:
All
- static Expression Get (IConnection connection, Expression arg, Expression index)¶
Access an element in a tuple, list or dictionary.
- Parameters:
arg – The tuple, list or dictionary.
index – The index of the element to access. A zero indexed integer for a tuple or list, or a key for a dictionary.
- Returns:
The element.
- Game Scenes:
All
- static Expression Count (IConnection connection, Expression arg)¶
Number of elements in a collection.
- Parameters:
arg – The list, set or dictionary.
- Returns:
The number of elements in the collection.
- Game Scenes:
All
- static Expression Sum (IConnection connection, Expression arg)¶
Sum all elements of a collection.
- Parameters:
arg – The list or set.
- Returns:
The sum of the elements in the collection.
- Game Scenes:
All
- static Expression Max (IConnection connection, Expression arg)¶
Maximum of all elements in a collection.
- Parameters:
arg – The list or set.
- Returns:
The maximum elements in the collection.
- Game Scenes:
All
- static Expression Min (IConnection connection, Expression arg)¶
Minimum of all elements in a collection.
- Parameters:
arg – The list or set.
- Returns:
The minimum elements in the collection.
- Game Scenes:
All
- static Expression Average (IConnection connection, Expression arg)¶
Minimum of all elements in a collection.
- Parameters:
arg – The list or set.
- Returns:
The minimum elements in the collection.
- Game Scenes:
All
- static Expression Select (IConnection connection, Expression arg, Expression func)¶
Run a function on every element in the collection.
- Parameters:
arg – The list or set.
func – The function.
- Returns:
The modified collection.
- Game Scenes:
All
- static Expression Where (IConnection connection, Expression arg, Expression func)¶
Run a function on every element in the collection.
- Parameters:
arg – The list or set.
func – The function.
- Returns:
The modified collection.
- Game Scenes:
All
- static Expression Contains (IConnection connection, Expression arg, Expression value)¶
Determine if a collection contains a value.
- Parameters:
arg – The collection.
value – The value to look for.
- Returns:
Whether the collection contains a value.
- Game Scenes:
All
- static Expression Aggregate (IConnection connection, Expression arg, Expression func)¶
Applies an accumulator function over a sequence.
- Parameters:
arg – The collection.
func – The accumulator function.
- Returns:
The accumulated value.
- Game Scenes:
All
- static Expression AggregateWithSeed (IConnection connection, Expression arg, Expression seed, Expression func)¶
Applies an accumulator function over a sequence, with a given seed.
- Parameters:
arg – The collection.
seed – The seed value.
func – The accumulator function.
- Returns:
The accumulated value.
- Game Scenes:
All
- static Expression Concat (IConnection connection, Expression arg1, Expression arg2)¶
Concatenate two sequences.
- Parameters:
arg1 – The first sequence.
arg2 – The second sequence.
- Returns:
The first sequence followed by the second sequence.
- Game Scenes:
All
- static Expression OrderBy (IConnection connection, Expression arg, Expression key)¶
Order a collection using a key function.
- Parameters:
arg – The collection to order.
key – A function that takes a value from the collection and generates a key to sort on.
- Returns:
The ordered collection.
- Game Scenes:
All
- static Expression All (IConnection connection, Expression arg, Expression predicate)¶
Determine whether all items in a collection satisfy a boolean predicate.
- Parameters:
arg – The collection.
predicate – The predicate function.
- Returns:
Whether all items satisfy the predicate.
- Game Scenes:
All
- static Expression Any (IConnection connection, Expression arg, Expression predicate)¶
Determine whether any item in a collection satisfies a boolean predicate.
- Parameters:
arg – The collection.
predicate – The predicate function.
- Returns:
Whether any item satisfies the predicate.
- Game Scenes:
All
- class Type¶
A server side expression.
- static Type Double (IConnection connection)¶
Double type.
- Game Scenes:
All
- static Type Float (IConnection connection)¶
Float type.
- Game Scenes:
All
- static Type Int (IConnection connection)¶
Int type.
- Game Scenes:
All
- static Type Bool (IConnection connection)¶
Bool type.
- Game Scenes:
All
- static Type String (IConnection connection)¶
String type.
- Game Scenes:
All