waoywssy / linfu

Automatically exported from code.google.com/p/linfu
0 stars 0 forks source link

DefaultMethodEmitter doesn't handle System.Windows.Forms.Message #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have a method that takes a System.Windows.Forms.Message structure. When
making a DynamicMock for this...

Method 'SaveRefArguments' gets the 'FullName' of the type of each parameter. 

When getting the unboxedType, Type.GetType("System.Windows.Forms.Message")
gets called. This returns null. 

This leads to an exception from calling a method on a null object. 

I have patched this on my version by changing the call to
"parameterType.FullName" to "parameterType.AssemblyQualifiedName"

This allows the type to be located by the call to Type.GetType. 

Original issue reported on code.google.com by nigel.th...@gmail.com on 25 Jan 2008 at 12:04

GoogleCodeExporter commented 9 years ago
Hi Nigel,

Thanks for catching that bug! Could you send a copy of the patch? Thanks.

Original comment by Philip.L...@gmail.com on 25 Jan 2008 at 11:02

GoogleCodeExporter commented 9 years ago

Original comment by Philip.L...@gmail.com on 21 Jul 2009 at 11:28