public static object Eval(object expr, FrameAndScope env) { // // Limited support in TurboMode // var saveContext = CurrentThreadContext.Frame; CurrentThreadContext.Frame = env.Frame; var scope = ReconstructAnalysisScope(env.Frame, env.Scope); // for <% examples ... %> //scope.IsFileScope = true; var result = Execute(Compile(expr, scope)); CurrentThreadContext.Frame.Names = scope.Names; CurrentThreadContext.Frame = saveContext; return(result); }
public static object Eval(object expr, FrameAndScope env) { // // Limited support in TurboMode // var saveContext = CurrentThreadContext.Frame; CurrentThreadContext.Frame = env.Frame; var scope = ReconstructAnalysisScope(env.Frame, env.Scope); // for <% examples ... %> //scope.IsFileScope = true; var result = Execute(Compile(expr, scope)); CurrentThreadContext.Frame.Names = scope.Names; CurrentThreadContext.Frame = saveContext; return result; }