Class Async
- Namespace
- BotManager.Runtime.Expressions
- Assembly
- BotManager.Runtime.dll
Runs the Expression in a new thread.
Return type is null.
null:
{ "$Async": { "$Delay": 5000 } }
[JsonConverter(typeof(AsyncConverter))]
public sealed class Async : IExpression
- Inheritance
-
Async
- Implements
- Inherited Members
Constructors
Async()
Empty constructor for serialization.
public Async()
Async(IExpression?)
Creates an expression that is runs another expression in another thread.
public Async(IExpression? expression)
Parameters
expressionIExpressionThe expression.
Properties
Expression
Gets and sets the expression.
[JsonRootProperty]
public IExpression? Expression { get; set; }
Property Value
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
contextRuntimeContextThe current runtime context.
returnTypeTypeThe expected return type. Use
typeof(object)for a generic result. Usenullif you don't need the return value.