[Mono-bugs] [Bug 651563] New: Type.GetTypeConverter returns null

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Nov 4 20:31:07 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=651563

https://bugzilla.novell.com/show_bug.cgi?id=651563#c0


           Summary: Type.GetTypeConverter returns null
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: x86
        OS/Version: Windows 7
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Core
        AssignedTo: jbevain at novell.com
        ReportedBy: cvolzke at live.com.au
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1036 Safari/532.5

For method TypeConverter GetConverter(object component, bool noCustomTypeDesc),
Type.GetType() is naively used to resolve TypeConverter types and thus
Type.GetTypeConverter often just returns null.

Instead,
component.GetType().Assembly.GetType(typeName) ??
component.GetType().GetType(typeName)
should be used (this appears to be the ms.net behavior).

Reproducible: Always

Steps to Reproduce:
1. Create a type say MyType and apply
[TypeConverter("MyNamespace.MyTypeConverter")] to the type. Do not specify the
name of the assembly.
2. Call TypeConverter.GetTypeConverter(new MyType(), false)
Actual Results:  
The TypeConverter type is not resolved (null is returned), thus the
TypeConverter is not applied.


Expected Results:  
The TypeConverter type should be resolved and returned.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list