Skip to content

Fix incorrect registration of user configuration actions in generic AddJsonFile overloads - #40

Merged
adams85 merged 3 commits into
masterfrom
fix/issue39
May 31, 2026
Merged

Fix incorrect registration of user configuration actions in generic AddJsonFile overloads#40
adams85 merged 3 commits into
masterfrom
fix/issue39

Conversation

@adams85

@adams85 adams85 commented May 29, 2026

Copy link
Copy Markdown
Owner

Fixes #39 (more precisely, corrects the incomplete fix implemented in #22)

The generic AddJsonFile overloads must apply the user configuration
callback to the named options instance that the provider resolves via
IOptionsMonitor.Get(optionsName). Before the fix the callback was
registered against Options.DefaultName, so it never reached the
provider's own options (#39). Each of the three
affected overloads is pinned independently: the tests fail against the
pre-fix source and pass with the fix (#40).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@adams85
adams85 merged commit 6f6be8b into master May 31, 2026
17 checks passed
@adams85
adams85 deleted the fix/issue39 branch May 31, 2026 10:04
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.

Generic AddJsonFile<TProvider>(configure:) registers configure on Options.DefaultName — unfixed half of #22

2 participants