Table of Contents

Struct RuntimeSemanticsEvaluationResult

Namespace
RDCore.SDK.Runtime.Shared
Assembly
RDCore.SDK.dll

Represents the result of the evaluation of any runtime semantics.

public readonly record struct RuntimeSemanticsEvaluationResult : IEquatable<RuntimeSemanticsEvaluationResult>
Implements
Inherited Members

Constructors

RuntimeSemanticsEvaluationResult(VBTypedValue?, VBRuntimeErrorInfo?)

Represents the result of the evaluation of any runtime semantics.

public RuntimeSemanticsEvaluationResult(VBTypedValue? Result, VBRuntimeErrorInfo? ErrorInfo)

Parameters

Result VBTypedValue

The result of the evaluation, if one was produced.

ErrorInfo VBRuntimeErrorInfo

The error metadata for the run-time error to be reported, if applicable.

Properties

ErrorInfo

The error metadata for the run-time error to be reported, if applicable.

public VBRuntimeErrorInfo? ErrorInfo { get; init; }

Property Value

VBRuntimeErrorInfo

IsError

true if the evaluation semantically yields a runtime error.

public bool IsError { get; }

Property Value

bool

Remarks

👉 This value represents a specified, consistent state where program execution resumes in a controlled error state.

IsInternalError

true if an evaluation strategy could not be determined.

public bool IsInternalError { get; }

Property Value

bool

Remarks

⚠️ This value represents an unspecified, inconsistent internal state that is ultimately surfaced as an InternalError run-time error.

IsSuccess

true if the evaluation was successfully completed.

public bool IsSuccess { get; }

Property Value

bool

Remarks

✅ This value represents a normally completed, successful evaluation.

Result

The result of the evaluation, if one was produced.

public VBTypedValue? Result { get; init; }

Property Value

VBTypedValue

Methods

Error(VBRuntimeErrorInfo, VBTypedValue?)

Creates a new (failed) RuntimeSemanticsEvaluationResult with the specified VBRuntimeErrorInfo error information metadata.

public static RuntimeSemanticsEvaluationResult Error(VBRuntimeErrorInfo error, VBTypedValue? result = null)

Parameters

error VBRuntimeErrorInfo

The runtime error metadata describing the evaluation failure.

result VBTypedValue

Returns

RuntimeSemanticsEvaluationResult

Remarks

❌ Use this method only to signal a failed expression evaluation. A result value may still have been assigned.

InternalError()

Creates a new RuntimeSemanticsEvalutationResult without a result, and without any VBRuntimeErrorInfo error metadata.

public static RuntimeSemanticsEvaluationResult InternalError()

Returns

RuntimeSemanticsEvaluationResult

Remarks

💥 This results signals a InternalError run-time error to the evaluation pipeline. Use it only as a fallback result, when no result can be evaluated for a given effective type.

Success(VBTypedValue)

Creates a new (successful) RuntimeSemanticsEvaluationResult with the specified evaluation result.

public static RuntimeSemanticsEvaluationResult Success(VBTypedValue result)

Parameters

result VBTypedValue

The successfully evaluated runtime semantics evaluation result.

Returns

RuntimeSemanticsEvaluationResult

Remarks

✅ Use this method only to signal a successully evaluated expression result.