Table of Contents

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.

This json example returns 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

context RuntimeContext

The current runtime context.

returnType Type

The expected return type. Use typeof(object) for a generic result. Use null if you don't need the return value.

Returns

Task<object>

Returns the result of the expression.