Skip to content

Improve IAsyncEnumerable discoverability for streaming result types #61987

Description

@JoshLove-msft

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Azure.CoreClientThis issue points to a problem in the data-plane of the library.design-discussionAn area of design currently under discussion and open to team and community feedback.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions