-
Notifications
You must be signed in to change notification settings - Fork 0
API Host ScriptMethodDelegate
Liu.Yandong.Hanks edited this page Aug 21, 2026
·
3 revisions
Delegate shape for host-held callable script methods.
Namespace: AuroraScript.Runtime. Kind: delegate.
Back to .NET Host API Reference
Delegate shape for host-held callable script methods.
A minimal use of ScriptMethodDelegate.
ScriptMethodDelegate echo = (userState, arguments) =>
arguments.Length == 0 ? ScriptDatum.Null : arguments[0];
var echoed = echo(null, ScriptDatum.FromNumber(42));
Console.WriteLine(echoed.Number); // 42ScriptDatum Invoke(ScriptObject userState = null, params ScriptDatum[] arguments)Parameters
| Name | Type | Required | Description |
|---|---|---|---|
userState |
ScriptObject |
No | User state associated with the execution context. |
arguments |
ScriptDatum[] |
No | Argument array passed to a script or callback. |
Returns
Returns ScriptDatum.
AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License