Exemple #1
0
        public void LoadModules(AssemblyDefinitionStatic assembly, RootNamespace targetNamespace)
        {
            if (RootContext.Modules.Count == 0)
            {
                return;
            }

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

                if (m.IsManifestModule)
                {
                    Error_FileCorrupted(moduleName);
                    continue;
                }

                var md = importer.ImportModule(assembly.IncludeModule(m), targetNamespace);
                assembly.AddModule(md);
            }
        }
Exemple #2
0
		public void LoadModules (AssemblyDefinitionStatic assembly, RootNamespace targetNamespace)
		{
			foreach (var moduleName in compiler.Settings.Modules) {
				var m = LoadModuleFile (moduleName);
				if (m == null)
					continue;

				if (m.IsManifestModule) {
					Error_ModuleIsAssembly (moduleName);
					continue;
				}

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