Execute<T> With IronRuby

Posted by: K. Scott Allen, on 04 Oct 2011 | View original | Bookmarked: 0 time(s)

Imagine (or dream) that you have some IronRuby code to execute. require 'net/telnet' host = Net::Telnet.new(:Host => 'localhost') #... #... #... return data One way to execute the code and capture the result is to use Execute<T> on the ScriptEngine object. public T Execute<T>(string fileName) { var script = File.ReadAllText(fileName); var engine = IronRuby.Ruby.CreateEngine(); engine.SetSearchPaths( SearchPaths // will contain paths like: // @"C:\Program...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Data | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 325 | Hits: 4

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD