I have this idea to try using my own IMPORT attribute for a new condition based class. For example, if I have:
[Import ("Position_32")] this should exist if I run a 32-bit OS, and then:
[Import ("Position_64")] if Im works with a 64-bit OS. Is there a way to make a type name for a dynamic attribute based on a condition?
Conceptually, it might look like this:
[Import (((IsWIN64 ())? Position_64 ":" Position_32 "))] This does not work because the type name must be a constant.
I want to make the new position class as transparent as possible. I mean, I used the factory method using funcs to get the desired effect, but I would like to use MEF for this. Ideas?
Extremely important
David
source share