Table of Contents

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.

OutputPath
RunnableScript

Returns compiled script assembly.

ScriptRun

Gets IScriptRun associated this script host.

SourceChanged

Methods

Compile()

Initializes script engine and compiles the script.

Dispose()

Disposes this ScriptHost and frees resources associated with it.

Dispose(bool)
Evaluate(string)

Evaluates specified expression within already existing code.

EvaluateExpression(string)

Evaluates specified expression.

EvaluateExpressionAsync(string, CancellationToken)

Evaluates specified expression asynchronously.

EvaluateImpl(string)
~ScriptHost()

Destroys the instance of the ScriptHost class.

InternalEvaluate(string)
InternalRun()
InternalRunAsync(CancellationToken)
InternalRunFunction(string, object[])
InternalRunMethodAsync(string, object[], CancellationToken)
OnScriptCompiled()
OnScriptError(ScriptErrorEventArgs)
OnScriptRunning()
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.

RunAsyncImpl(CancellationToken)
RunFunction(string, object[])

Executes specified function.

RunFunctionAsync(string, object[], CancellationToken)

Executes specified function asynchronously.

RunFunctionAsyncImpl(string, object[], CancellationToken)
RunFunctionImpl(string, object[])
RunImpl()