I'd like to use MEF in a windows service / WCF service.
The configuration of the AggregateCatalog is no problem, but what do I do with the methods CreateShell() and InitializeShell()? The service can't have a shell, so do I just return null?
And where would I create and run the bootstrapper? In OnStart of the Service class?
MEF doesn't have CreateShell and InitializeShell methods. I think those are methods that Prism uses. Prism is a UI application framework which uses MEF. Since you are writing a service, you wouldn't use Prism, but you could use MEF.
Create a CompositionContainer connected to the catalog you've created, and then you can pull exports from the container.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With