I have an IronRuby script like this one:
class MyClassA < NamespaceMaze::BaseClass
description = "I'm MyClassA"
# <snip> some methods
end
class HelperClass; end
class MyClassC < NamespaceMaze::BaseClass
description = "I'm MyClassC"
# <snip> some methods
end
And a .net class like this one:
namespace NamespaceMaze
{
public class BaseClass
{
public static string Description
{
get; protected set;
}
// <snip> some more methods and properties
}
}
Now, in C#, i load the script. Then I want to do three things:
- Figure out what types are defined in the script which inherit from BaseClass
- Read their Description property
- Create some instances
All three steps would be relatively easy if I had the System::Type objects for the classes... So how do I get them? I know that the ScriptRuntime-object has the "Globals"-Property which contains a dictionary of strings and dynamic-objects... But what next?