Class ScriptHost
- Namespace
- Alternet.Scripter.TypeScript
- Assembly
- Alternet.Scripter.TypeScript.v9.dll
Provides a base class for script execution. This class is abstract.
public abstract class ScriptHost : IScriptHost, IDisposable
- Inheritance
-
ScriptHost
- Implements
- Derived
Constructors
- ScriptHost(IScriptRun)
Initializes a new instance of
ScriptHost
with specified script runner.
Properties
- CompileFailed
Gets or sets boolean value indicating unsuccessful script compilation.
- Compiled
Gets boolean value indicating that script has been compiled and ready to be executed.
- CompilerErrors
Gets list of compiler errors associated with the script being executed.
- HostItemsConfiguration
Gets script host configuration.
- ModulesDirectoryPath
Gets or sets path for compiled script assemblies.
- OutputFileName
Gets script assembly file name.
- RunnableScript
Returns compiled script assembly.
- ScriptRun
Gets
IScriptRun
associated this script host.
Methods
- Compile()
Initializes script engine and compiles the script.
- Dispose()
Disposes this
ScriptHost
and frees resources associated with it.
- Evaluate(string)
Evaluates specified expression within already existing code.
- EvaluateExpression(string)
Evaluates specified expression.
- EvaluateExpressionAsync(string, CancellationToken)
Evaluates specified expression asynchronously.
- ~ScriptHost()
Destroys the instance of the
ScriptHost
class.
- Reset()
Removes the script engine from the running state and disconnects automatically bound event handlers.
- Run()
Executes script starting from the main entry point.
- RunAsync(CancellationToken)
Executes script asynchronously starting from the main entry point.
- RunFunction(string, object[])
Executes specified function.
- RunFunctionAsync(string, object[], CancellationToken)
Executes specified function asynchronously.