Class Boolean
- Namespace
- BotManager.Runtime.Expressions
- Assembly
- BotManager.Runtime.dll
A static bool value.
Returns type is bool.
true:
{ "$Boolean": true }
Or even shorter:
true
[JsonConverter(typeof(BooleanConverter))]
public sealed class Boolean : IExpression
- Inheritance
-
Boolean
- Implements
- Inherited Members
Constructors
Boolean()
Empty constructor for serialization.
public Boolean()
Boolean(bool)
Creates a bool expression.
public Boolean(bool value)
Parameters
valueboolThe value.
Properties
Value
Gets and sets the value.
[JsonRootProperty]
public bool Value { 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.