Class DlrHost<T>
Host environment for the dynamic language runtime
Inheritance
System.Object
DlrHost<T>
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Simplic.Dlr
Assembly: Simplic.Dlr.dll
Syntax
public class DlrHost<T> : IDlrHost where T : IDlrLanguage
Type Parameters
Name | Description |
---|---|
T |
Constructors
| Improve this Doc View SourceDlrHost(T)
Create a new dlr host environment
Declaration
public DlrHost(T language)
Parameters
Type | Name | Description |
---|---|---|
T | language |
Properties
| Improve this Doc View SourceDefaultScope
Default scope for the current dlr host instance
Declaration
public DlrScriptScope DefaultScope { get; }
Property Value
Type | Description |
---|---|
DlrScriptScope |
Resolver
Import resolver list
Declaration
public IList<IDlrImportResolver> Resolver { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<IDlrImportResolver> |
ScriptEngine
Instance of the ScriptEngine connected with the host
Declaration
public ScriptEngine ScriptEngine { get; }
Property Value
Type | Description |
---|---|
ScriptEngine |
Methods
| Improve this Doc View SourceAddImportResolver(IDlrImportResolver)
Add a resolver instance to the resolver list
Declaration
public void AddImportResolver(IDlrImportResolver resolver)
Parameters
Type | Name | Description |
---|---|---|
IDlrImportResolver | resolver |
AddSearchPath(String)
Add additional search path to look for modules/packages in the filesystem
Declaration
public void AddSearchPath(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path to the modules |
CreateNewDefaultScope()
Create new default scope. One default scope will be created automatically when creating a Host-Instance.
Declaration
public DlrScriptScope CreateNewDefaultScope()
Returns
Type | Description |
---|---|
DlrScriptScope | Scope instance |
LoadAssembly(Assembly)
Load an assembly into the runtime
Declaration
public void LoadAssembly(Assembly asm)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | asm | Instance of an assembly |
PreCompile()
Precompile all available scripts
Declaration
public void PreCompile()
RemoveSearchPath(String)
Remove search path from the list of module/package paths
Declaration
public bool RemoveSearchPath(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path to remove |
Returns
Type | Description |
---|---|
System.Boolean | True if the path was found and removed, else false |