API ReferenceSandbox
ScriptInvocation<T>class
A temporary script argument, kept on the stack. Chain With to add arguments, then Run or Compile. Each run uses fresh copies; host objects and borrowed buffers remain shared.
object→ScriptInvocation<T>
Methods4
Showing 4 methods
public bool Compile()
Checks compilation without running script expressions. Failure sets Script.LastError.
Returns:
bool—public bool Run(int instructionLimit = 10000000)
Runs synchronously. Returns false and sets Script.LastError on failure.
| Parameter | Type | Description |
|---|---|---|
| instructionLimit = 10000000 | int | — |
Returns:
bool—public TResult RunAndReturn(int instructionLimit = 10000000)
Runs and reads the result. Returns default on failure or when no value is returned.
| Parameter | Type | Description |
|---|---|---|
| instructionLimit = 10000000 | int | — |
Returns:
TResult—public Sandbox.ScriptInvocation`2<Sandbox.ScriptInvocation`1<T>,TValue> With(string name, TValue value)
Adds a temporary argument. The name must be referenced by the script; the last value wins.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| value | TValue | — |
Returns:
ScriptInvocation<ScriptInvocation<T>,TValue>—No results match this filter.