Skip to content

Conversation

@cabauman
Copy link
Contributor

@cabauman cabauman commented Jul 9, 2020

What kind of change does this PR introduce?

developer usefulness

What is the current behavior?

When using RegisterViewsForViewModels, it throws an InvalidOperationException with the unhelpful message, "Sequence contains no matching element," if any of the views are missing a parameterless constructor.

What is the new behavior?

Message is changed to "Failed to register type {typeInfo.FullName} because it's missing a parameterless constructor."

What might this PR break?
Nothing.

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:
Resolves #2437

@cabauman cabauman requested a review from a team July 9, 2020 12:00
@glennawatson glennawatson changed the title Throw an informative registry exception fix: Throw an informative registry exception in RegisterViewsForViewModels Jul 10, 2020
@glennawatson glennawatson reopened this Jul 10, 2020
@glennawatson glennawatson merged commit 0e974f6 into reactiveui:main Jul 10, 2020
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] RegisterViewsForViewModels throws System.InvalidOperationException: "Sequence contains no matching element"

3 participants