question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ComposeExportedValue equivalent?

See original GitHub issue

For MEF you have the ComposeExportedValue method to export a specific instance.

E.g. in Prism, this method is used to register pre-created instances when setting up the container. Not sure how to mimic that with Vs-mef. Ideas?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
weltkantecommented, May 28, 2019

The docs go briefly over this scenario. Just have some properties that export the desired services and fill them during startup before dependent services are initialized. I usually make a private nested class for seeding such services together with container initialization. Sometimes you can also just export static properties if your service is process wide.

0reactions
znakeeyecommented, May 28, 2019

Bah! I get it now 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

ComposeExportedValue<T> in MEF2 (System.Composition)
Shows how to generate exports on the fly so that they can be injected into constructors of the types that depend on them...
Read more >
MEF 2 - What is the equivalent of AddExportedValue?
The equivalent is ComposeExportedValue : container.ComposeExportedValue<MyDataSet>(dataset);.
Read more >
AttributedModelServices.ComposeExportedValue Method
Creates a part from a specified object and composes it with a specified composition container.
Read more >
Configuring and creating an extensible composite ...
ComposeExportedValue (AggregateCatalog); } }. Here CreateShell() method will return the main window to be shown when application starts up.
Read more >
Initializing Applications Using the Prism Library for WPF
Creating and configuring the different containers involve similar concepts that ... ComposeExportedValue<IServiceLocator>(new MefServiceLocatorAdapter(this.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found