// // Initializes the code generator // public bool Create(AppDomain domain, AssemblyBuilderAccess access) { #if STATIC throw new NotSupportedException(); #else ResolveAssemblySecurityAttributes(); var an = CreateAssemblyName(); try { Builder = file_name == null? domain.DefineDynamicAssembly(an, access) : domain.DefineDynamicAssembly(an, access, Dirname(file_name)); } catch (ArgumentException) { // specified key may not be exportable outside it's container if (RootContext.StrongNameKeyContainer != null) { Report.Error(1548, "Could not access the key inside the container `" + RootContext.StrongNameKeyContainer + "'."); } throw; } module.Create(this, CreateModuleBuilder()); builder_extra = new AssemblyBuilderMonoSpecific(Builder, Compiler); return(true); #endif }
// // Initializes the code generator // public bool Create(AppDomain domain, AssemblyBuilderAccess access) { #if STATIC || FULL_AOT_RUNTIME throw new NotSupportedException(); #else ResolveAssemblySecurityAttributes(); var an = CreateAssemblyName(); Builder = file_name == null? domain.DefineDynamicAssembly(an, access) : domain.DefineDynamicAssembly(an, access, Dirname(file_name)); module.Create(this, CreateModuleBuilder()); builder_extra = new AssemblyBuilderMonoSpecific(Builder, Compiler); return(true); #endif }