X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Filasm%2Fcodegen%2FModule.cs;h=32ca848fbd108e4c55881f944e57726a1ff1628d;hb=71ad74dc11c5fa4bc8c178a5457d2cab732fdb01;hp=29a8881a5ade519a93ada913b4638f737cca78b5;hpb=c4aef31eeea309e6a795c84c098ac8e1a2490340;p=mono.git diff --git a/mcs/ilasm/codegen/Module.cs b/mcs/ilasm/codegen/Module.cs index 29a8881a5ad..32ca848fbd1 100644 --- a/mcs/ilasm/codegen/Module.cs +++ b/mcs/ilasm/codegen/Module.cs @@ -12,30 +12,42 @@ using System.Collections; namespace Mono.ILASM { - public class Module : ICustomAttrTarget { - string name; - ArrayList customattr_list; + public class Module : ExternRef { + + PEAPI.Module module; public Module (string name) + : base (name) { - this.name = name; - customattr_list = null; } - public string Name { - get { return name; } + public PEAPI.Module PeapiModule { + get { return module; } + set { module = value; } + } + + public override string FullName { + get { + //'name' field should not contain the [ ] + //as its used for resolving + return String.Format ("[{0}]", name); + } } - public void AddCustomAttribute (CustomAttr customattr) + public override PEAPI.IExternRef GetExternRef () { - if (customattr_list == null) - customattr_list = new ArrayList (); + return module; + } - customattr_list.Add (customattr); + public override void Resolve (CodeGen code_gen) + { + throw new InternalErrorException ("This should not get called"); } public void Resolve (CodeGen code_gen, PEAPI.Module module) { + this.module = module; + if (customattr_list == null) return;