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>
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed struct Sandbox.ScriptInvocation<T>

Methods4

Showing 4 methods

public bool Compile()PUBLIC

Checks compilation without running script expressions. Failure sets Script.LastError.

Returns:bool—

public bool Run(int instructionLimit = 10000000)PUBLIC

Runs synchronously. Returns false and sets Script.LastError on failure.

ParameterTypeDescription
instructionLimit = 10000000int—
Returns:bool—

public TResult RunAndReturn(int instructionLimit = 10000000)PUBLIC

Runs and reads the result. Returns default on failure or when no value is returned.

ParameterTypeDescription
instructionLimit = 10000000int—
Returns:TResult—

public Sandbox.ScriptInvocation`2<Sandbox.ScriptInvocation`1<T>,TValue> With(string name, TValue value)PUBLIC

Adds a temporary argument. The name must be referenced by the script; the last value wins.

ParameterTypeDescription
namestring—
valueTValue—
Returns:ScriptInvocation<ScriptInvocation<T>,TValue>—

On this page