Class And
- Namespace
- BotManager.Runtime.Expressions
- Assembly
- BotManager.Runtime.dll
Logical and operator. It returns true if all expression in this list are true or if the list is empty.
Execution is stopped, once the first entry returns false.
Return type is bool.
true:
{ "$And": [ true, true ] }
This json example returns false:
{ "$And": [ true, false ] }
[JsonConverter(typeof(ListConverter<And>))]
public sealed class And : List<IExpression?>, IList<IExpression?>, ICollection<IExpression?>, IList, ICollection, IReadOnlyList<IExpression?>, IReadOnlyCollection<IExpression?>, IEnumerable<IExpression?>, IEnumerable, IExpression
- Inheritance
-
And
- Implements
- Inherited Members
Constructors
And()
public And()
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.