[Mono-bugs] [Bug 69114][Nor] New - GetModule of AssemblyBuilder does not returns dynamics modules
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 4 Nov 2004 19:25:06 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by mono@evain.net.
http://bugzilla.ximian.com/show_bug.cgi?id=69114
--- shadow/69114 2004-11-04 19:25:06.000000000 -0500
+++ shadow/69114.tmp.1034 2004-11-04 19:25:06.000000000 -0500
@@ -0,0 +1,63 @@
+Bug#: 69114
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity: Unknown
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: mono@evain.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: GetModule of AssemblyBuilder does not returns dynamics modules
+
+Description of Problem:
+Calling the GetModule(string) on an AssemblyBuilder does not returns
+dynamics module whereas Microsoft Runtime does.
+
+Steps to reproduce the problem:
+1. Create a AssemblyBuilder
+2. Define a Dynamic Module
+3. Try to get it using GetModule
+
+Actual Results:
+null
+
+Expected Results:
+an instance of a dynamic module
+
+How often does this happen?
+always
+
+Additional Information:
+I know there is a GetDynamicModule method, but MS Framework allows
+developers to get a dynamic module this way.
+
+Here is a simple program to test it :
+
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
+public class Test {
+ public static void Main() {
+ AssemblyName assemblyName = new AssemblyName();
+ assemblyName.Name = "MyDynamicAssembly";
+
+ AssemblyBuilder assemblyBuilder =
+AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName,
+AssemblyBuilderAccess.Run);
+ ModuleBuilder moduleBuilder =
+assemblyBuilder.DefineDynamicModule("MyDynamicModule");
+ if (assemblyBuilder.GetModule("MyDynamicModule") != null) {
+ Console.WriteLine("founded");
+ } else {
+ Console.WriteLine("not found");
+ }
+ }
+}