예제 #1
0
 /// <summary>
 /// Initializes a new <see cref="ScriptEngine"/>, optionally bound to an existing <see cref="GlobalContext"/>.
 /// </summary>
 /// <param name="ctx">Optional global context to use.</param>
 /// <param name="breakPointManager">Optional <see cref="BreakpointManager"/> instance to use.</param>
 /// <param name="scopeManager">Optional <see cref="DynamicScope"/> to use.</param>
 public ScriptEngine( GlobalContext ctx = null, BreakpointManager breakPointManager = null, DynamicScope scopeManager = null )
 {
     _breakpoints = breakPointManager ?? new BreakpointManager();
     _globalContext = ctx ?? new GlobalContext();
     _visitor = new EvalVisitor( _globalContext, _breakpoints.MustBreak, scopeManager );
 }
예제 #2
0
 /// <summary>
 /// Initializes a new <see cref="ScriptEngine"/>, optionally bound to an existing <see cref="GlobalContext"/>.
 /// </summary>
 /// <param name="ctx">Optional global context to use.</param>
 /// <param name="breakPointManager">Optional <see cref="BreakpointManager"/> instance to use.</param>
 /// <param name="scopeManager">Optional <see cref="DynamicScope"/> to use.</param>
 public ScriptEngine(GlobalContext ctx = null, BreakpointManager breakPointManager = null, DynamicScope scopeManager = null)
 {
     _breakpoints   = breakPointManager ?? new BreakpointManager();
     _globalContext = ctx ?? new GlobalContext();
     _visitor       = new EvalVisitor(_globalContext, _breakpoints.MustBreak, scopeManager);
 }