public static CompilerPipeline AdjustPipeline(EvaluationContext context, CompilerPipeline pipeline) { pipeline.InsertAfter(typeof(IntroduceUnityGlobalNamespaces), new IntroduceScriptingNamespace(context)); pipeline.InsertAfter(typeof(IntroduceScriptingNamespace), new IntroduceImports(context)); pipeline.InsertAfter(typeof(ApplySemantics), new IntroduceEvaluationContext(context)); pipeline.Replace(typeof(ProcessUnityScriptMethods), new ProcessScriptingMethods(context)); pipeline.InsertAfter(typeof(ProcessScriptingMethods), new IntroduceReturnValue()); return pipeline; }
public Evaluator(EvaluationContext context, string code) { if (code == null) { throw new ArgumentNullException("code"); } if (context == null) { throw new ArgumentNullException("context"); } this._context = context; this._code = code; this._cacheKey = new EvaluationScriptCacheKey(context.GetType(), code); }
public static object Eval(EvaluationContext context, string code) { return new Evaluator(context, code).Run(); }
public IntroduceEvaluationContext(EvaluationContext evaluationContext) { this._evaluationContext = evaluationContext; }
public ProcessScriptingMethods(EvaluationContext evaluationContext) { this._evaluationContext = evaluationContext; }
public IntroduceImports(EvaluationContext context) { this._evaluationContext = context; }