Skip to content

Clarify documentation of IChangeToken.ActiveChangeCallbacks#126640

Merged
svick merged 1 commit intodotnet:mainfrom
svick:compositechangetoken-activechangecallbacks
Apr 9, 2026
Merged

Clarify documentation of IChangeToken.ActiveChangeCallbacks#126640
svick merged 1 commit intodotnet:mainfrom
svick:compositechangetoken-activechangecallbacks

Conversation

@svick
Copy link
Copy Markdown
Member

@svick svick commented Apr 8, 2026

Resolves #40677.

In particular, see the explanation at #40677 (comment).

Copilot AI review requested due to automatic review settings April 8, 2026 11:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR clarifies the documentation contract around IChangeToken.ActiveChangeCallbacks, specifically addressing scenarios (like CompositeChangeToken) where ActiveChangeCallbacks == true doesn’t imply that every underlying change will reliably trigger callbacks.

Changes:

  • Updates IChangeToken.ActiveChangeCallbacks XML docs to better describe consumer expectations and accuracy considerations.
  • Adds/expands CompositeChangeToken documentation to describe how inner tokens with/without active callbacks affect callback propagation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/libraries/Microsoft.Extensions.Primitives/src/IChangeToken.cs Refines the interface-level docs for ActiveChangeCallbacks and adds remarks about accuracy expectations.
src/libraries/Microsoft.Extensions.Primitives/src/CompositeChangeToken.cs Documents CompositeChangeToken callback propagation behavior and clarifies ActiveChangeCallbacks meaning for composites.

Comment thread src/libraries/Microsoft.Extensions.Primitives/src/IChangeToken.cs
Comment thread src/libraries/Microsoft.Extensions.Primitives/src/IChangeToken.cs
Copy link
Copy Markdown
Member

@tarekgh tarekgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

CC @KalleOlaviNiemitalo if has any feedback.

@tarekgh tarekgh added this to the 11.0.0 milestone Apr 8, 2026
@svick
Copy link
Copy Markdown
Member Author

svick commented Apr 9, 2026

/ba-g CI failures are not related to this doc-only change

@svick svick merged commit 6967149 into dotnet:main Apr 9, 2026
88 of 100 checks passed
@svick svick deleted the compositechangetoken-activechangecallbacks branch April 9, 2026 08:56
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.

CompositeChangeToken.ActiveChangeCallbacks returns true when not all inner change tokens do so

4 participants