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

Change ExceptionsStore to allow multiple callbacks #5213

Merged
merged 2 commits into from
Aug 29, 2023

Conversation

jander-msft
Copy link
Member

Summary

Refactor the ExceptionsStore callback notion in order to allow multiple callbacks and separate the callback behavior from the store implementation. These changes allow future callbacks to be added without having to chain exception store implementations together and to separate the callback concerns from the store concerns.

Overview of Changes

  • Introduce IExceptionsStoreCallback and IExceptionsStoreCallbackFactory interfaces; the latter allows breaking circular dependencies between exception stores and callback implementations that would prevent DI composition.
  • Refactor ConfiguredExceptionsStore into ExceptionsStoreLimitsCallback and ExceptionsStoreLimitsCallbackFactory.
  • Refactor ConfiguredExceptionsStoreTests into ExceptionsStoreTests and ExceptionsStoreLimitsCallbackTests to separate testing concerns between testing the now-only exceptions store implementation and the callback implementation.
Release Notes Entry

@jander-msft jander-msft requested a review from a team as a code owner August 28, 2023 16:25
@ghost ghost added the needs-review label Aug 28, 2023
@ghost ghost removed the needs-review label Aug 28, 2023
@ghost ghost added the needs-review label Aug 28, 2023
@ghost ghost removed the needs-review label Aug 29, 2023
@jander-msft jander-msft merged commit 3a5929c into dotnet:main Aug 29, 2023
30 checks passed
@jander-msft jander-msft deleted the exceptions-callback-refactor branch August 29, 2023 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants