.net - How do I identify my own parts in an MEF catalogue? -


following article create composite modular ui application in wpf using mef , prism, have wpf application instructed, , view injected region on main window works fine. however, module project exports mef parts, have set output directory parts repository directory somewhere. when build solution, modulea.dll gets placed in directory, it's dependencies.

i use directorycatalog on parts repo directory, , contains 26 parts, 1 of mine. extract list of parts mine directory, not using raw reflection myself, e.g. not examining assemblies , building assemblycatalog. there way can call parts on directory, , examine exports see mine? if browse catalogue, can see part, can't see properties can examine grammatically.

if want load things single specific assembly, kinda goes against whole point of mef... if that's want, reference assembly directly. if want things mef way, app shouldn't concerned what's in catalog - should "import" interface needs , let framework figure out part satisfy interface. assuming have defined custom interface part, mef find 1 implementation of in 1 assembly , won't find in other 25 assemblies.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -