Skip to content

Support equivalent of ComposeExportedValue in System.Composition #18624

Closed

Description

@dsplaisted

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 #15362, it would be useful to have this ability in System.Composition (MEF2).

Activity

  1. karelz commented on Nov 23, 2016

    @karelz
    Member

    We need formal API proposal

  2. NEKIT-Boss commented on May 4, 2017

    @NEKIT-Boss

    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);
  3. siobhanc commented on Jul 31, 2017

    @siobhanc

    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

  4. exones commented on Oct 16, 2017

    @exones

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

  5. pascalpfeil commented on Jul 12, 2018

    @pascalpfeil

    +1 for this

  6. gthvidsten commented on Apr 27, 2019

    @gthvidsten

    +1 (Surprised nothing has happened after 2.5 years!)

  7. danmoseley commented on Apr 27, 2019

    @danmoseley
    Contributor

    Nobody has made a formal API proposal. Guidelines for the format are in the docs folder in this repo. Then the API board can review. If approved, we would welcome a PR with tests from the community.

  8. gthvidsten commented on Apr 27, 2019

    @gthvidsten

    @danmosemsft Care to provide a direct link to the guideline?

  9. transferred this issue fromdotnet/corefxon Jan 31, 2020
  10. added this to the 5.0 milestone on Jan 31, 2020
  11. added
    untriaged
    on Feb 23, 2020
  12. ericstj commented on Jul 9, 2020

    @ericstj
    Member

    I believe this is now tracked with #29400

  13. ghost locked as resolved and limited conversation to collaborators on Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-needs-workarea-System.Compositionuntriaged

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions