Mono.Cecil.AssemblyDefinition.CreateAssembly C# (CSharp) Method

CreateAssembly() public static method

public static CreateAssembly ( Mono.Cecil.AssemblyNameDefinition assemblyName, string moduleName, ModuleParameters parameters ) : AssemblyDefinition
assemblyName Mono.Cecil.AssemblyNameDefinition
moduleName string
parameters ModuleParameters
return AssemblyDefinition
        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;
        }

Same methods

AssemblyDefinition::CreateAssembly ( Mono.Cecil.AssemblyNameDefinition assemblyName, string moduleName, ModuleKind kind ) : AssemblyDefinition

Usage Example

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