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.
- ScriptRun
Gets
IScriptRun
associated this script host.
- SkipSyntaxErrorCheck
Gets or sets a boolean value indicating whether to skip the script syntax error check.
Methods
- Compile()
Initializes script engine and compiles the script.
- Dispose()
Disposes this
ScriptHost
and frees resources associated with it.
- 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.
- 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.
- RunFunction(string, object[])
Executes specified function.
- RunFunctionAsync(string, object[], CancellationToken)
Executes specified function asynchronously.
- 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.