internal override void InitializeConstants(RubyContext context, Dictionary<string, object> constants) { if (_type != typeof(object)) { var typeNesting = ((MetadataRecord)_typeDef).Tables.GetTypeNesting(); foreach (TypeDef typeDef in typeNesting.GetNestedTypes(_typeDef)) { constants.Add(typeDef.Name.ToString(), new RubyModule(context, new ClrTypeInfo(typeDef))); } } }
internal RubyModule(RubyContext context, ClrModuleInfo clrModule) { _context = context; _clrModule = clrModule; }
internal override void InitializeConstants(RubyContext context, Dictionary<string, object> constants) { foreach (TypeDef typeDef in _namespaceNode.GetTypeDefs()) { constants[typeDef.Name.ToString()] = new RubyModule(context, new ClrTypeInfo(typeDef)); } foreach (var ns in _namespaceNode.GetNamespaces()) { constants[ns.Name.ToString()] = new RubyModule(context, new ClrNamespaceInfo(ns)); } // TODO: resolve namespace/type conflicts (C# doesn't allow, but there could be some) _namespaceNode = null; }
internal abstract void InitializeConstants(RubyContext context, Dictionary<string, object> constants);
public static void Run() { var context = new RubyContext(); context.OnAssemblyLoaded(typeof(object).Assembly); context.OnAssemblyLoaded(typeof(Expression).Assembly); }
internal abstract void InitializeConstants(RubyContext context, Dictionary <string, object> constants);