Table of Contents

Class Info

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

Writes a log message to the standard output.

Return type is null.

This json example writes an info message to the output and returns null:
{ "$Info": "This is an info!" }
[JsonConverter(typeof(InfoConverter))]
public sealed class Info : IExpression
Inheritance
Info
Implements
Inherited Members

Constructors

Info()

Empty constructor for serialization.

public Info()

Info(IExpression?)

Creates an expression that logs the given message in the standard output.

public Info(IExpression? message)

Parameters

message IExpression

The expression to resolve the log message.

Properties

Message

Gets and sets the expression to resolve the message to log as information.

[JsonRootProperty]
public IExpression? Message { 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.