Table of Contents

Class Not

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

Inverts the given boolean expression.

Return type is bool.

This json example returns false:
{ "$Not": true }
This json example returns true:
{ "$Not": false }
[JsonConverter(typeof(NotConverter))]
public sealed class Not : IExpression
Inheritance
Not
Implements
Inherited Members

Constructors

Not()

Empty constructor for serialization.

public Not()

Not(IExpression?)

Creates an expression that inverts the given expression.

public Not(IExpression? expression)

Parameters

expression IExpression

Properties

Expression

Gets and sets the expression

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