Table of Contents

Class ScriptHost

Namespace
Alternet.Scripter.IronPython
Assembly
Alternet.Scripter.IronPython.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.

ExecutableModulePath

Gets script assembly path.

ModulesDirectoryPath

Gets or sets path for compiled script assemblies.

OutputFileName

Gets script assembly file name.

OutputPath
ScriptRun

Gets IScriptRun associated this script host.

SkipSyntaxErrorCheck

Gets or sets a boolean value indicating whether to skip the script syntax error check.

SourceChanged
TextOutputCallback
TraceCallback

Methods

Compile()

Initializes script engine and compiles the script.

Dispose()

Disposes this ScriptHost and frees resources associated with it.

Dispose(bool)
EvaluateExpression(string)

Evaluates specified expression.

EvaluateExpressionAsync(string, CancellationToken)

Evaluates specified expression asynchronously.

~ScriptHost()

Destroys the instance of the ScriptHost class.

InternalRun()
InternalRunAsync(CancellationToken)
InternalRunFunction(string, object[])
InternalRunMethodAsync(string, object[], CancellationToken)
InternalRunProcess(object[], bool)
MarkNotChanged()
OnScriptCompiled()
OnScriptError(ScriptErrorEventArgs)
OnScriptExecuted()
OnScriptRunning()
Reset()

Removes the script engine from the running state and disconnects automatically bound event handlers.

ResolveReferences(IList<string>)

When implemented by a class, returns list of assembly references used by the script.

Run()

Executes script starting from the main entry point.

RunAsync(CancellationToken)

Executes script asynchronously starting from the main entry point.

RunCore()
RunCoreAsync(CancellationToken)
RunFunction(string, object[])

Executes specified function.

RunFunctionAsync(string, object[], CancellationToken)

Executes specified function asynchronously.

RunFunctionCore(string, object[])
RunFunctionCoreAsync(string, object[], CancellationToken)
RunProcess(string[], bool)

Executes script starting from the main entry point in standalone process.

RunProcessCore(IScriptRun, string, object[], bool)

Executes script starting from the main entry point in standalone process.