feat: Add Extension Method for adding global Hook via DependencyInjection#459
Merged
askpt merged 7 commits intoMay 6, 2025
Merged
Conversation
Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com>
Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com>
kylejuliandev
commented
Apr 29, 2025
kylejuliandev
commented
Apr 29, 2025
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #459 +/- ##
==========================================
+ Coverage 86.47% 86.72% +0.25%
==========================================
Files 42 42
Lines 1671 1703 +32
Branches 177 179 +2
==========================================
+ Hits 1445 1477 +32
Misses 187 187
Partials 39 39 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
askpt
reviewed
Apr 30, 2025
askpt
left a comment
Member
There was a problem hiding this comment.
Looks good to me. Please look into the suggestions!
* This will allow consumers to easily add Hooks without forcing them to write a function everytime they do Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com>
Member
|
I forgot to add it. Can you please update the |
Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com>
* Add unit tests to cover off new AddHook extension method Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com>
Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com>
arttonoyan
approved these changes
May 4, 2025
askpt
approved these changes
May 4, 2025
kinyoklion
approved these changes
May 5, 2025
WeihanLi
pushed a commit
to WeihanLi/openfeature-dotnet-sdk
that referenced
this pull request
May 14, 2025
…tion (open-feature#459) <!-- Please use this template for your pull request. --> <!-- Please use the sections that you need and delete other sections --> ## This PR <!-- add the description of the PR here --> - This adds a new OpenFeatureBuilder extension method to add global or not domain-bound hooks to the OpenFeature Api. ### Related Issues <!-- add here the GitHub issue that this PR resolves if applicable --> Fixes open-feature#456 ### Notes <!-- any additional notes for this PR --> We inject any provided Hooks as Singletons in the DI container. We use keyed singletons and use the class name as the key. Maybe we'd want to use a different name to avoid conflicts? I've done some manual testing with a sample weatherforecast ASP.NET Core web application ### Follow-up Tasks <!-- anything that is related to this PR but not done here should be noted under this section --> <!-- if there is a need for a new issue, please link it here --> ### How to test <!-- if applicable, add testing instructions under this section --> --------- Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com> Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com> Signed-off-by: Weihan Li <weihanli@outlook.com>
github-merge-queue Bot
pushed a commit
that referenced
this pull request
May 23, 2025
🤖 I have created a release *beep* *boop* --- ## [2.6.0](v2.5.0...v2.6.0) (2025-05-23) ### ✨ New Features * add AddHandler extension method to Dependency Injection package ([#462](#462)) ([ff414b8](ff414b8)) * Add Extension Method for adding global Hook via DependencyInjection ([#459](#459)) ([9b04485](9b04485)) * Add OTEL compatible telemetry object builder ([#397](#397)) ([6c44db9](6c44db9)) ### 🧹 Chore * Cleanup .props file ([#476](#476)) ([6d7a535](6d7a535)) * **deps:** update actions/attest-build-provenance action to v2.3.0 ([#464](#464)) ([0a5ab0c](0a5ab0c)) * **deps:** update codecov/codecov-action action to v5.4.3 ([#475](#475)) ([fbcf3a4](fbcf3a4)) * **deps:** update github/codeql-action digest to 60168ef ([#463](#463)) ([ea76351](ea76351)) * **deps:** update github/codeql-action digest to ff0a06e ([#473](#473)) ([af1b20f](af1b20f)) * **deps:** update spec digest to edf0deb ([#474](#474)) ([fc3bdfe](fc3bdfe)) ### 📚 Documentation * Add AspNetCore sample app ([#477](#477)) ([9742a0d](9742a0d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com> Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com>
This was referenced Dec 17, 2025
Closed
Closed
Closed
Closed
This was referenced Jan 9, 2026
Closed
Closed
Closed
Closed
Closed
Closed
This was referenced Apr 8, 2026
This was referenced May 1, 2026
This was referenced Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR
Related Issues
Fixes #456
Notes
We inject any provided Hooks as Singletons in the DI container. We use keyed singletons and use the class name as the key. Maybe we'd want to use a different name to avoid conflicts?
I've done some manual testing with a sample weatherforecast ASP.NET Core web application
Follow-up Tasks
How to test