Skip to content

Commit ed50882

Browse files
BillWagnerjskeet
authored andcommitted
Item 10: §23.5.2 EnumeratorCancellation warning
Swap "enumerable" and "enumerator" (and their `§15.15.3`/`§15.15.2` xrefs) in the third warning bullet.
1 parent e2e0adf commit ed50882

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

standard/attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ It is an error if the `System.Runtime.CompilerServices.EnumeratorCancellation` a
10741074
10751075
- The `EnumeratorCancellation` attribute is applied to a parameter of a type other than `CancellationToken`,
10761076
- or if the `EnumeratorCancellation` attribute is applied to a parameter on a method that is not an asynchronous iterator ([§15.15](classes.md#1515-synchronous-and-asynchronous-iterators)),
1077-
- or if the `EnumeratorCancellation` attribute is applied to a parameter on a method that returns an asynchronous enumerable interface ([§15.15.3](classes.md#15153-enumerable-interfaces)) rather than an asynchronous enumerator interface ([§15.15.2](classes.md#15152-enumerator-interfaces)).
1077+
- or if the `EnumeratorCancellation` attribute is applied to a parameter on a method that returns an asynchronous enumerator interface ([§15.15.2](classes.md#15152-enumerator-interfaces)) rather than an asynchronous enumerable interface ([§15.15.3](classes.md#15153-enumerable-interfaces)).
10781078
10791079
The iterator will not have access to the `CancellationToken` argument for `GetAsyncEnumerator` when no attributes have this parameter.
10801080

0 commit comments

Comments
 (0)