コード例 #1
0
        public static AssemblyDefinition CreateAssembly(AssemblyNameDefinition assemblyName, string moduleName, ModuleParameters parameters)
        {
            if (assemblyName == null)
            {
                throw new ArgumentNullException("assemblyName");
            }
            if (moduleName == null)
            {
                throw new ArgumentNullException("moduleName");
            }
            Mixin.CheckParameters(parameters);
            if (parameters.Kind == ModuleKind.NetModule)
            {
                throw new ArgumentException("kind");
            }

            var assembly = ModuleDefinition.CreateModule(moduleName, parameters).Assembly;

            assembly.Name = assemblyName;

            return(assembly);
        }
コード例 #2
0
        public static AssemblyDefinition CreateAssembly(AssemblyNameDefinition assemblyName, string moduleName, ModuleParameters parameters)
        {
            if (assemblyName == null)
                throw new ArgumentNullException("assemblyName");
            if (moduleName == null)
                throw new ArgumentNullException("moduleName");
            Mixin.CheckParameters(parameters);
            if (parameters.Kind == ModuleKind.NetModule)
                throw new ArgumentException("kind");

            var assembly = ModuleDefinition.CreateModule(moduleName, parameters).Assembly;
            assembly.Name = assemblyName;

            return assembly;
        }
コード例 #3
0
 public static AssemblyDefinition CreateAssembly(AssemblyNameDefinition assemblyName, string moduleName, ModuleKind kind)
 {
     return CreateAssembly(assemblyName, moduleName, new ModuleParameters { Kind = kind });
 }
コード例 #4
0
 public static AssemblyDefinition CreateAssembly(AssemblyNameDefinition assemblyName, string moduleName, ModuleKind kind)
 {
     return(CreateAssembly(assemblyName, moduleName, new ModuleParameters {
         Kind = kind
     }));
 }