Skip to content
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

Add docs on substitutes for dynamic recomposition #32

Merged
merged 2 commits into from
Aug 29, 2017

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented Aug 28, 2017

No description provided.

@msftclas
Copy link

@AArnott,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@codecov-io
Copy link

codecov-io commented Aug 28, 2017

Codecov Report

Merging #32 into v15.3 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##            v15.3      #32   +/-   ##
=======================================
  Coverage   83.85%   83.85%           
=======================================
  Files          70       70           
  Lines        5338     5338           
  Branches      831      831           
=======================================
  Hits         4476     4476           
  Misses        635      635           
  Partials      227      227

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a550b4...d07ad55. Read the comment docs.

{
ExportProvider ep; // TODO: initialize this.

// Set up the mocks before acquiring other exports.
Copy link

@IlyaBiryukov IlyaBiryukov Aug 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, if other parts tried to get IFoo or IBar first before the test sets them up, what's going to happen?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the test queries for an export that requires activating a part that imports an IFoo, then MEF would activate the MockSupplier and query its property. If you have already set the property's value, the MEF import will be satisfied with that value; otherwise the default value for that property will be used to satisfy the import (null in this case).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added more comments to this doc to help explain this.

@@ -0,0 +1,60 @@
# Dynamic Recomposition

VS-MEF does not support .NET MEF's dynamic recomposition feature. This feature is exposed in .NET MEF in several ways, including:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's going to happen with ImportAttribute.AllowRecomposition property? Is it going to be ignored?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we ignore that parameter. it's fine if they support it -- we just don't ever do it.

@AArnott AArnott force-pushed the dev/andarno/compose_alternatives branch from aa286d2 to d07ad55 Compare August 29, 2017 05:30
@AArnott AArnott merged commit af76f30 into v15.3 Aug 29, 2017
@AArnott AArnott deleted the dev/andarno/compose_alternatives branch August 29, 2017 05:38
AArnott added a commit that referenced this pull request Jun 7, 2022
Merge master to microbuild
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants