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

ActivatorUtilities not depending on ctor order for creating instances #75846

Merged
merged 9 commits into from
Oct 13, 2022

Commits on Oct 8, 2022

  1. Fixes the bug with behaviour dependence on order of constructor defin…

    …ition.
    
    Tries to find the longest constructor matching all parameters based on the behaviour of IServiceProviderIsService.
    
    - All the instance arguments passed in to CreateInstance were required before and should remain required after the breaking change.
    - Generally we do not want CreateInstance to be as strict as CreateFactory.
    - CreateInstance needs to account for the case where a container is potentially misconfigured. If for any reason IServiceProviderIsService ends returns false for a service which is actually registered, should still work today, but it is ok to give false negative.
    
    - If none are found, try to fallback to CreateFactory, more than one throw
    - if IServiceProviderIsService is not present fallback to CreateFactory.
    - If IServiceProviderIsService is configured wrong, or does not exist, it is OK for the API to function incorrectly or ambiguously.
    maryamariyan committed Oct 8, 2022
    Configuration menu
    Copy the full SHA
    84d9662 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2022

  1. Apply PR feedback

    maryamariyan committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    a3de5c0 View commit details
    Browse the repository at this point in the history
  2. Add mocked service

    maryamariyan committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    fcd0f5b View commit details
    Browse the repository at this point in the history
  3. mocked serviceprovider

    maryamariyan committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    42152c5 View commit details
    Browse the repository at this point in the history
  4. Undo mocking fix NRE bug

    maryamariyan committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    f8d5069 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cf36a7d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    54b1af1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    54e17ae View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2022

  1. Configuration menu
    Copy the full SHA
    5fa924c View commit details
    Browse the repository at this point in the history