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

Updates for Container Extensions #2086

Merged
merged 10 commits into from
Apr 24, 2020
Merged

Updates for Container Extensions #2086

merged 10 commits into from
Apr 24, 2020

Conversation

dansiegel
Copy link
Member

@dansiegel dansiegel commented Apr 23, 2020

Description of Change

This adds a number of extensions from the Prism.Container.Extensions to provide a more complete registration API.

This also adds a ContainerResolutionException that both the UnityContainerExtension and DryIocContainerExtension will through when they are unable to resolve a given type.

The ContainerResolutionException has a GetErrors method which will evaluate the resolution error to try to give you additional information around why the resolution error occurred.

  • For instance you wrote bad XAML and encountered a XAML Parse Exception that was thrown by InitializeComponents in the View's ctor
  • Or you were missing a registration for a given service, etc... Note currently this will show an error for INavigationService in Xamarin.Forms since it doesn't have any knowledge of INavigationService or the service name.

fixes #2076
fixes #2078

Behavioral Changes

The UnityContainerExtension is now guarded on named resolutions as Unity would simply activate a new object() when trying to resolve unregistered Views.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard

@dansiegel dansiegel merged commit 43f7f5b into master Apr 24, 2020
@lock
Copy link

lock bot commented May 20, 2020

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

1 similar comment
@lock
Copy link

lock bot commented May 20, 2020

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

@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
@dansiegel dansiegel deleted the containerextensions branch August 21, 2020 14:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Proposal] Add ContainerResolutionException [Enhancement] Container Abstraction Enhancements
1 participant