Table of Contents

Class String

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

A static string value.

Returns type is string.

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

Constructors

String()

Empty constructor for serialization.

public String()

String(string)

Creates a string expression.

public String(string value)

Parameters

value string

The value.

Properties

Value

Gets and sets the value.

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

Property Value

string

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.