示例#1
0
 /// <summary>
 /// Run the code in the given scope.
 /// </summary>
 /// <param name="scope">ScriptScope to be used when running the code.</param>
 /// <returns>The value of the last evaluated expression.</returns>
 public override object Run(Microsoft.Scripting.Runtime.Scope scope)
 {
     // This is where the magic happens.
     // 1. The Target property compiled the code to an executable delegate.
     // 2. We execute it with:
     //      - The SmalltalkEnvironment (that is bound to the LanguageContext)
     //      - The receiver ... which is currently set to nil (null).
     return(this.Code.Execute(null, new ExecutionContext(this.Runtime)));
 }
示例#2
0
文件: Sympl.cs 项目: TerabyteX/main
 public Sympl(IList<Assembly> assms, Scope dlrGlobals) {
     _assemblies = assms;
     _dlrGlobals = dlrGlobals;
     AddAssemblyNamesAndTypes();
 }
示例#3
0
 public Sympl(IList <Assembly> assms, Scope dlrGlobals)
 {
     _assemblies = assms;
     _dlrGlobals = dlrGlobals;
     AddAssemblyNamesAndTypes();
 }