ICustomTypeDescriptor for simulating strong-typing

546 views Asked by At

I thought about simulating strong-typing for key-value configuration of a new project by providing fake property info via implementing ICustomTypeDescriptor.

The configuration instance should provide all default config keys as properties with default values however: I noticed that VS08 intellisense doesn't include "faked" properties which are created in example similar to

http://zcoder.blogspot.com/2007/11/icustomtypedescriptor.html

Even if I intellisense caches properties information, I used a static instance of the MyCustomClass in another class in a dll and still didn't get intellisense working for it.

Useful Ref ICustomTypeDescriptor, TypeDescriptionProvider, TypeConverter, and UITypeEditor

1

There are 1 answers

0
leppie On

ICustomTypeDescriptor never provides a type-safe interface, so I cannot see how it can ever provide Intellisense.