Class Or
- Namespace
- BotManager.Runtime.Expressions
- Assembly
- BotManager.Runtime.dll
Logical or operator. It returns true if any expression in this list is true or if the list is empty.
Execution is stopped, once the first entry returns true.
Return type is bool.
true:
{ "$Or": [ true, false ] }
This json example returns false:
{ "$Or": [ false, false ] }
[JsonConverter(typeof(ListConverter<Or>))]
public sealed class Or : List<IExpression?>, IList<IExpression?>, ICollection<IExpression?>, IList, ICollection, IReadOnlyList<IExpression?>, IReadOnlyCollection<IExpression?>, IEnumerable<IExpression?>, IEnumerable, IExpression
- Inheritance
-
Or
- Implements
- Inherited Members
Constructors
Or()
public Or()
Methods
ExecuteAsync(RuntimeContext, Type?)
Executes the expression in the given RuntimeContext. Please do not use this method to run an expression. Use ExecuteAsync(IExpression?) instead.
public Task<object?> ExecuteAsync(RuntimeContext context, Type? returnType)
Parameters
contextRuntimeContextThe current runtime context.
returnTypeTypeThe expected return type. Use
typeof(object)for a generic result. Usenullif you don't need the return value.