writing an expression to disk

Nov 22, 2009 at 9:06 PM

Is it possible to write a Microsoft.Scripting.Ast.Expression to disk as IL code so that it can be executed later? It is actually an ExpressionBlock, but I could change this if need be.

I found this post:

http://dlr.codeplex.com/Thread/View.aspx?ThreadId=48559

This involved ScriptCode.SaveToAssembly. I couldn't figure out how to get that to work with just an Expression.

 

thanks in advance

 

Coordinator
Nov 22, 2009 at 9:09 PM

The only support we have is if you have a LambdaExpr, and you pass a MethodBuilder to Compile.  It is up to the caller to create the assembly, save it to disk, etc.  IronPython does this if you want to see how they use it.

Bill

From: CodeMoniker [mailto:notifications@codeplex.com]
Sent: Sunday, November 22, 2009 2:06 PM
To: Bill Chiles
Subject: writing an expression to disk [dlr:75885]

From: CodeMoniker

Is it possible to write a Microsoft.Scripting.Ast.Expression to disk as IL code so that it can be executed later? It is actually an ExpressionBlock, but I could change this if need be.

I found this post:

http://dlr.codeplex.com/Thread/View.aspx?ThreadId=48559

This involved ScriptCode.SaveToAssembly. I couldn't figure out how to get that to work with just an Expression.

thanks in advance

Read the full discussion online.

To add a post to this discussion, reply to this email (dlr@discussions.codeplex.com)

To start a new discussion for this project, email dlr@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com