Table of Contents

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.

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

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.