我有一个应用程序在C#中实现了多个对象,然后通过将这些对象添加到Microsoft.Scripting.Hosting.ScriptScope中,期望这些对象可以从IronRuby中使用。这在很大程度上起作用:我已经学会了如何实现DynamicObject的各种成员以使事情正确运行。但是,如何让对象与Ruby的for循环兼容? 我的C#对象是这样的: public class TrialObjec
我正在使用Revit API进行使用IronRuby的可扩展存储,并且我认为我的问题是IronRuby。我试图从杰里米Tannik的的Revit博客在IronRuby中重现此C#示例: // create a field to store a string map
FieldBuilder fieldBuilder =
schemaBuilder.AddMapField("St
我在我的电脑上安装了IronRuby和想尝试像创建一个窗口简单的事情: require "System.Windows.Forms"
include System::Windows::Forms
form = Form.new
form.Title = "Hello IronRuby" # This doesn't work. ("Undefined method Title= for Sy
我刚开始使用IronRuby。这是我的测试类: class Program
{
static void Main(string[] args)
{
var path = @"C:\Users\frays\Desktop\test.rb";
var engine = Ruby.CreateEngine();
var scop
我想浏览(并检查)ironruby作用域的作用域变量。 如果我执行: a = 15
b = 16
c = a * b
我想列举 “a,b,c”,并得到他们的需求值。 我试过runtime.Globals.GetVariableNames()和runtime.Globals.GetItems()但都返回空的枚举器。