Interaction Service

These behave similar to the extension methods, except that complex types will remain in the AppDomain of IronScheme. A RemoteObject will be returned that can be used to reference any instance data.

public interface IInteractionService
  string EvalToString(string expr);
  string EvalToString(string expr, string importspec);
  object Eval(string expr, params object[] args);
  object Eval(string expr, string importspec, params object[] args);

var i = ServiceManager.GetInteractionService();
var r = i.EvalToString("(+ 1 1)");

var w = i.Eval("(lambda (x)(+ {0} x))", 33);
var x = i.Eval("({0} {1})", w, 22);

Last edited Jul 3, 2009 at 9:21 PM by leppie, version 4