Class EvaluateExpressionRequest
Internal storage class for expression evaluation requests
Inherited Members
Namespace: DuetControlServer.SPI
Assembly: DuetControlServer.dll
Syntax
public class EvaluateExpressionRequest
Constructors
EvaluateExpressionRequest(CodeChannel, string)
Constructor of this class
Declaration
public EvaluateExpressionRequest(CodeChannel channel, string expression)
Parameters
Type | Name | Description |
---|---|---|
CodeChannel | channel | Where to evaluate the expression |
string | expression | Expression to evaluate |
Properties
Channel
Where the expression is evaluated
Declaration
public CodeChannel Channel { get; }
Property Value
Type | Description |
---|---|
CodeChannel |
Expression
Expression to evaluate
Declaration
public string Expression { get; }
Property Value
Type | Description |
---|---|
string |
Task
Task that completes when the request has been fulfilled
Declaration
public Task<object?> Task { get; }
Property Value
Type | Description |
---|---|
Task<object> |
Written
Whether the request has been sent to the firmware
Declaration
public bool Written { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
SetCanceled()
Set the task to canceled
Declaration
public void SetCanceled()
SetException(Exception)
Set an exception for the task
Declaration
public void SetException(Exception exception)
Parameters
Type | Name | Description |
---|---|---|
Exception | exception | Exception to set |
SetResult(object?)
Set the result of the evaluated expression
Declaration
public void SetResult(object? result)
Parameters
Type | Name | Description |
---|---|---|
object | result | Result to set |