Ejemplo n.º 1
0
        public void LoadModules(AssemblyDefinitionDynamic assembly, RootNamespace targetNamespace)
        {
            foreach (var moduleName in compiler.Settings.Modules)
            {
                var m = LoadModuleFile(assembly, moduleName);
                if (m == null)
                {
                    continue;
                }

                var md = importer.ImportModule(m, targetNamespace);
                assembly.AddModule(md);
            }
        }
Ejemplo n.º 2
0
        public void LoadModules(AssemblyDefinitionDynamic assembly, RootNamespace targetNamespace)
        {
            if (RootContext.Modules.Count == 0)
            {
                return;
            }

            foreach (var moduleName in RootContext.Modules)
            {
                var m = LoadModuleFile(assembly, moduleName);
                if (m == null)
                {
                    continue;
                }

                var md = importer.ImportModule(m, targetNamespace);
                assembly.AddModule(md);
            }
        }