Skip to content

Clarify documentation of IChangeToken.ActiveChangeCallbacks#126640

Open
svick wants to merge 1 commit intodotnet:mainfrom
svick:compositechangetoken-activechangecallbacks
Open

Clarify documentation of IChangeToken.ActiveChangeCallbacks#126640
svick wants to merge 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.

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
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