Table of Contents

Class Int32

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

A static int value.

Return type is int.

This json example returns 10:
{ "$Int32": 10 }
Or even shorter:
10
[JsonConverter(typeof(Int32Converter))]
public sealed class Int32 : IExpression
Inheritance
Int32
Implements
Inherited Members

Constructors

Int32()

Empty constructor for serialization.

public Int32()

Int32(int)

Creates a int expression.

public Int32(int value)

Parameters

value int

The value.

Properties

Value

Gets and sets the value.

[JsonRootProperty]
public int Value { get; set; }

Property Value

int

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.