ScriptStack 1.0.0
A .NET scripting language
|
The main interface to create a Host. A Host can implement Routine's to extend its functionality. Mehr ...
Öffentliche Methoden | |
object | Invoke (string routine, List< object > parameters) |
Called when a Routine is invoked. | |
The main interface to create a Host. A Host can implement Routine's to extend its functionality.
A Host must implement the Invoke() method. As you can see, it is just an empty declaration to hook in.
Every time a Routine is requested from within a script, this method is invoked.
You have to implement the logic (the function body) inside this method!
The name of the Routine is passed as string as 1st parameter. Parameters are passed as a list of objects as 2nd parameter.
A Host class with a registered "print" Routine would look like the following example.
You can call Routine's directly by calling the Invoke method on the corresponding handler (Host / Model) passing its name and a list of parameters (if needed)
object ScriptStack.Runtime.Host.Invoke | ( | string | routine, |
List< object > | parameters ) |
Called when a Routine is invoked.
routine | |
parameters |
Wird benutzt von ScriptStack.Runtime.Interpreter.INV().