Class Delay
- Namespace
- BotManager.Runtime.Expressions
- Assembly
- BotManager.Runtime.dll
Holds execution and waits the defined number of milliseconds.
Return type is null.
null:
{ "$Delay": 3000 }
[TypeConverter(typeof(DelayConverter))]
public sealed class Delay : IExpression
- Inheritance
-
Delay
- Implements
- Inherited Members
Constructors
Delay()
Empty constructor for serialization.
public Delay()
Delay(IExpression?)
Creates an expression that holds execution and waits the defined number of milliseconds.
public Delay(IExpression? milliseconds)
Parameters
millisecondsIExpressionThe expression to resolve the number of milliseconds to wait.
Properties
Milliseconds
Gets and sets the expression to resolve the number of milliseconds to wait.
[JsonRootProperty]
public IExpression? Milliseconds { 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.