New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support equivalent of ComposeExportedValue in System.Composition #11856

Open
dsplaisted opened this Issue Sep 19, 2016 · 5 comments

Comments

Projects
None yet
6 participants
@dsplaisted
Member

dsplaisted commented Sep 19, 2016

System.ComponentModel.Composition (MEF1) has the ability to supply imports to an already-instantiated object, via the ComposeExportedValue<T>(T exportedValue) method. As requested by @ZigMeowNyan and @jabbera in #3636, it would be useful to have this ability in System.Composition (MEF2).

@karelz

This comment has been minimized.

Show comment
Hide comment
@karelz

karelz Nov 23, 2016

Member

We need formal API proposal

Member

karelz commented Nov 23, 2016

We need formal API proposal

@NEKIT-Boss

This comment has been minimized.

Show comment
Hide comment
@NEKIT-Boss

NEKIT-Boss May 4, 2017

Add methods to ContainerConfiguration class:

public ContainerConfiguration WithInstance<TExport> (TExport instance);
public ContainerConfiguration WithInstance<TExport> (string contractName, TExport instance);
public ContainerConfiguration WithInstance (Type t, object instance);
public ContainerConfiguration WithInstance (Type t, string contractName, object instance);

NEKIT-Boss commented May 4, 2017

Add methods to ContainerConfiguration class:

public ContainerConfiguration WithInstance<TExport> (TExport instance);
public ContainerConfiguration WithInstance<TExport> (string contractName, TExport instance);
public ContainerConfiguration WithInstance (Type t, object instance);
public ContainerConfiguration WithInstance (Type t, string contractName, object instance);
@siobhanc

This comment has been minimized.

Show comment
Hide comment
@siobhanc

siobhanc Jul 31, 2017

Just adding a +1 to this request. Heavily reliant on ComposeExportedValue and without it, or a sensible workaround, will have to completely redesign my system in order to port to .Net Core

siobhanc commented Jul 31, 2017

Just adding a +1 to this request. Heavily reliant on ComposeExportedValue and without it, or a sensible workaround, will have to completely redesign my system in order to port to .Net Core

@exones

This comment has been minimized.

Show comment
Hide comment
@exones

exones Oct 16, 2017

This is very frustrating lack of functionality, I join @siobhanc in his comment

exones commented Oct 16, 2017

This is very frustrating lack of functionality, I join @siobhanc in his comment

@pascalpfeil

This comment has been minimized.

Show comment
Hide comment
@pascalpfeil

pascalpfeil commented Jul 12, 2018

+1 for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment