Ejemplo n.º 1
0
        private void LoadTypes(Assembly assembly)
        {
            Type[] types = assembly.GetExportedTypes();

            foreach (Type type in types)
            {
                ReflectedModule scope = global;
                string[]        ns    = type.Namespace.Split('.');
                string          full  = "";
                bool            dot   = false;
                foreach (string n in ns)
                {
                    full  = dot ? full + "." + n : n;
                    dot   = true;
                    scope = scope.EnsureNamespace(full, SymbolTable.StringToId(n));
                }
                scope.AddType(type);
            }
        }