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

Adding TryRegister #2960

Merged
merged 2 commits into from Sep 17, 2023
Merged

Adding TryRegister #2960

merged 2 commits into from Sep 17, 2023

Conversation

dansiegel
Copy link
Member

Description of Change

Adding TryRegister API for the container. This will avoid re-registering services which have already been registered.

API Changes

Added:

  • IContainerRegistry TryRegister()
  • IContainerRegistry TryRegisterScoped()
  • IContainerRegistry TryRegisterSingleton()
  • IContainerRegistry TryRegister<TFrom, TTo>()
  • IContainerRegistry TryRegisterScoped<TFrom, TTo>()
  • IContainerRegistry TryRegisterSingleton<TFrom, TTo>()
  • IContainerRegistry TryRegisterInstance(T instance)

Behavioral Changes

Prism will now internally call TryRegister

@dansiegel dansiegel added this to the Prism 9.0 milestone Sep 16, 2023
@dansiegel dansiegel merged commit 31e4bb3 into master Sep 17, 2023
6 checks passed
@dansiegel dansiegel deleted the dev/ds/registeronce branch September 17, 2023 11:40
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

1 participant