Table of Contents

Class In

Namespace
BotManager.Runtime.Expressions
Assembly
BotManager.Runtime.dll

Returns a boolean value if Value is equal to at least one item in List.

Return type is bool.

This json example returns true:
{ "$In": { "Value": 10, "List": [ 1, 2, 10 ] } }
This json example returns false:
{ "$In": { "Value": 10, "List": [ 1, 2, 3 ] } }
public sealed class In : IExpression
Inheritance
In
Implements
Inherited Members

Constructors

In()

public In()

Properties

List

Gets the list to compare Value with.

public List? List { get; set; }

Property Value

List

Value

Gets the value to check.

public IExpression? Value { get; set; }

Property Value

IExpression

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.