Fix and Update the summary for AggregateException.Flatten() - #13049
Fix and Update the summary for AggregateException.Flatten()#13049bb-froggy wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
Pull request overview
This PR updates the API reference documentation for System.AggregateException.Flatten() to improve the clarity and grammar of its <summary> description.
Changes:
- Reworded the
Flatten()method summary to clarify that it flattens a hierarchy (“tree”) of nestedAggregateExceptioninstances into a single returned instance.
File summaries
| File | Description |
|---|---|
| xml/System/AggregateException.xml | Updates the Flatten() method summary text for improved clarity/grammar. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <Parameters /> | ||
| <Docs> | ||
| <summary>Flattens an <see cref="T:System.AggregateException" /> instances into a single, new instance.</summary> | ||
| <summary>Flattens a tree of <see cref="T:System.AggregateException" /> instances into a single, new instance.</summary> |
|
Tagging subscribers to this area: @dotnet/area-system-runtime |
| <Parameters /> | ||
| <Docs> | ||
| <summary>Flattens an <see cref="T:System.AggregateException" /> instances into a single, new instance.</summary> | ||
| <summary>Flattens a tree of <see cref="T:System.AggregateException" /> instances into a single, new instance.</summary> |
There was a problem hiding this comment.
an was arguably correct, this renders as
Flattens an AggregateException instances into a single, new instance.
i.e. an AggregateException
The mistake here is likely in the use of instances, particularly given that "tree" has its own implications and that may not at all be what this is.
If this were to be reworded for clarity, maybe it should instead focus on what its actually doing here, which is pulling InnerExceptions, checking if any are AggregateException, and if so pulling its InnerExceptions up (recursively). -- Correspondingly, if this represents a graph with a cycle, it can fault.
Summary
The current summary of AggregateException.Flatten() is grammatically incorrect and difficult to understand.
This updated version is grammatically correct and also makes it clearer what the Flatten method does.
Internal previews
Build report