Skip to content

[🚀 Feature]: [dotnet][bidi] IEventStream<>.ConfigureAwait() call is ambiguous #17696

Description

@kevinoid

Description

I noticed an ergonomic issue with the event streams added in #17349 (which are fantastic, by the way!) that seemed worth noting: When ConfigureAwait(bool) is called on IEventStream<> to control capturing context during disposal, it causes compile error CS0121 due to ambiguity between TaskAsyncEnumerableExtensions.ConfigureAwait(IAsyncDisposable, bool) and TaskAsyncEnumerableExtensions.ConfigureAwait<T>(IAsyncEnumerable<T>, bool).

This isn't a showstopper, since a cast to either type can be added to resolve the ambiguity. However, this seems less than ideal as it clutters the code for a common operation, and steepens the learning code as developers need to understand how to resolve the error initially and determine which cast to make.

Perhaps it would make sense to provide a .ConfigureAwait<T>(IEventStream<T>, bool) extension method which forwards to TaskAsyncEnumerableExtensions.ConfigureAwait<T>(IAsyncEnumerable<T>, bool) to avoid the ambiguity?

Have you considered any alternatives or workarounds?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!C-dotnet.NET BindingsI-enhancementSomething could be better

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions