Class VariableRequest
- Namespace
- DuetControlServer.Link
- Assembly
- DuetControlServer.dll
Internal storage class for variable requests
public class VariableRequest
- Inheritance
-
VariableRequest
- Inherited Members
Constructors
VariableRequest(CodeChannel, bool, string, string?)
Internal storage class for variable requests
public VariableRequest(CodeChannel channel, bool createVariable, string varName, string? expression)
Parameters
channelCodeChannelWhere to evaluate the expression
createVariableboolWhether the variable is supposed to be created
varNamestringName of the variable
expressionstringExpression to evaluate
Properties
Channel
Where the expression is evaluated
public CodeChannel Channel { get; }
Property Value
CreateVariable
Whether the variable is supposed to be created
public bool CreateVariable { get; }
Property Value
Expression
Expression to set or null if the variable is supposed to be deleted
public string? Expression { get; }
Property Value
Task
Task that completes when the request has been fulfilled
public Task<object?> Task { get; }
Property Value
VariableName
Name of the variable
public string VariableName { get; }
Property Value
Written
Whether the request has been sent to the firmware
public bool Written { get; set; }
Property Value
Methods
SetCanceled()
Set the task to canceled
public void SetCanceled()
SetException(Exception)
Set an exception for the task
public void SetException(Exception exception)
Parameters
exceptionExceptionException to set
SetResult(object?)
Set the result of the evaluated expression
public void SetResult(object? result)
Parameters
resultobjectResult to set