lsoft / SyncToAsyncExtension

A Visual Studio extension (VSIX) which creates codelenses allowed to go to sync sibling method for async methods and vice-versa.
MIT License
1 stars 0 forks source link

Handle IAsyncEnumerable #1

Closed virzak closed 8 months ago

virzak commented 8 months ago

Hi @lsoft,

It would be useful if the extension could also pick up siblings of IAsyncEnumerable. For example:

public static async IAsyncEnumerable<double> MovingAverageAsync(this IAsyncEnumerable<double> source, int windowSize, IProgress<int>? progress = null, [EnumeratorCancellation] CancellationToken ct = default)

to:

public static IEnumerable<double> MovingAverage(this IEnumerable<double> source, int windowSize)

Full source code is here.

lsoft commented 8 months ago

@virzak Looks like I fixed it and published a new version 1.6 of the Vsix to the marketplace. Please let me know if I miss something (missing something is my passion! 🫡 )

virzak commented 8 months ago

Tested and it works great!