Table of Contents

Class VariableRequest

Namespace
DuetControlServer.Link
Assembly
DuetControlServer.dll

Internal storage class for variable requests

public class VariableRequest
Inheritance
VariableRequest
Inherited Members

Constructors

Internal storage class for variable requests

public VariableRequest(CodeChannel channel, bool createVariable, string varName, string? expression)

Parameters

channel CodeChannel

Where to evaluate the expression

createVariable bool

Whether the variable is supposed to be created

varName string

Name of the variable

expression string

Expression to evaluate

Properties

Where the expression is evaluated

public CodeChannel Channel { get; }

Property Value

CodeChannel

Whether the variable is supposed to be created

public bool CreateVariable { get; }

Property Value

bool

Expression to set or null if the variable is supposed to be deleted

public string? Expression { get; }

Property Value

string

Task that completes when the request has been fulfilled

public Task<object?> Task { get; }

Property Value

Task<object>

Name of the variable

public string VariableName { get; }

Property Value

string

Whether the request has been sent to the firmware

public bool Written { get; set; }

Property Value

bool

Methods

Set the task to canceled

public void SetCanceled()

Set an exception for the task

public void SetException(Exception exception)

Parameters

exception Exception

Exception to set

Set the result of the evaluated expression

public void SetResult(object? result)

Parameters

result object

Result to set