Context
The new streaming APIs expose a client result type that implements IAsyncEnumerable<T>, but the interface is currently implemented explicitly.
Concern
It may not be apparent to callers that the result is enumerable. LLMs may infer this from the inheritance hierarchy and implemented interfaces, but many developers discover APIs through IntelliSense. With explicit implementation, GetAsyncEnumerator does not appear as a discoverability hint.
Options to consider
- Implement
IAsyncEnumerable<T> implicitly.
- Add an
EventStream property that returns the result as IAsyncEnumerable<T>.
- Explore another API shape that makes asynchronous enumeration obvious in IntelliSense.
Goal
Ensure developers can readily discover how to consume streaming results without needing to inspect the type hierarchy or documentation.
Context
The new streaming APIs expose a client result type that implements
IAsyncEnumerable<T>, but the interface is currently implemented explicitly.Concern
It may not be apparent to callers that the result is enumerable. LLMs may infer this from the inheritance hierarchy and implemented interfaces, but many developers discover APIs through IntelliSense. With explicit implementation,
GetAsyncEnumeratordoes not appear as a discoverability hint.Options to consider
IAsyncEnumerable<T>implicitly.EventStreamproperty that returns the result asIAsyncEnumerable<T>.Goal
Ensure developers can readily discover how to consume streaming results without needing to inspect the type hierarchy or documentation.