1 interface inheriting from IAsyncEnumerable
System.Linq.AsyncEnumerable (1)
System\Linq\OrderBy.cs (1)
435public interface IOrderedAsyncEnumerable<out TElement> : IAsyncEnumerable<TElement>
17 implementations of IAsyncEnumerable
Aspire.Cli.Tests (1)
Utils\EmptyAsyncEnumerable.cs (1)
17private sealed class EmptyAsyncEnumerableImpl : IAsyncEnumerable<T>
Aspire.Hosting (1)
Dcp\ResourceLogSource.cs (1)
18IAsyncEnumerable<LogEntryList>
Microsoft.AspNetCore.Mvc.Core.Test (2)
Infrastructure\AsyncEnumerableReaderTest.cs (2)
252public class MultiAsyncEnumerable : IAsyncEnumerable<object>, IAsyncEnumerable<string>
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
src\Mvc\Mvc.Core\test\Infrastructure\AsyncEnumerableReaderTest.cs (2)
252public class MultiAsyncEnumerable : IAsyncEnumerable<object>, IAsyncEnumerable<string>
Microsoft.AspNetCore.SignalR.Client.Core (1)
src\SignalR\common\Shared\AsyncEnumerableAdapters.cs (1)
71private sealed class CancelableTypedAsyncEnumerable<TResult> : IAsyncEnumerable<TResult>
Microsoft.AspNetCore.SignalR.Core (1)
src\SignalR\common\Shared\AsyncEnumerableAdapters.cs (1)
71private sealed class CancelableTypedAsyncEnumerable<TResult> : IAsyncEnumerable<TResult>
Microsoft.AspNetCore.SignalR.Tests (5)
HubConnectionHandlerTestUtils\Hubs.cs (3)
856public class AsyncEnumerableImpl<T> : IAsyncEnumerable<T> 871public class AsyncEnumerableImplChannelThrows<T> : ChannelReader<T>, IAsyncEnumerable<T> 1166private class CustomAsyncEnumerable : IAsyncEnumerable<int>
Internal\ReflectionHelperTests.cs (2)
68private class CustomAsyncEnumerable : IAsyncEnumerable<object> 76private class CustomAsyncEnumerableOfT<T> : IAsyncEnumerable<object>
Microsoft.DotNet.XUnitAssert.Tests (1)
AsyncCollectionAssertsTests.cs (1)
1560 sealed class SpyEnumerator<T> : IAsyncEnumerable<T>, IAsyncEnumerator<T>
Microsoft.Extensions.AI.Tests (1)
Functions\AIFunctionFactoryTest.cs (1)
203private sealed class ThrowingAsyncEnumerable : IAsyncEnumerable<int>
System.Linq.AsyncEnumerable (1)
System\Linq\Empty.cs (1)
24IAsyncEnumerable<TResult>, IAsyncEnumerator<TResult>, IOrderedAsyncEnumerable<TResult>
System.Text.Json (1)
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableOfTConverter.cs (1)
135private sealed class BufferedAsyncEnumerable : IAsyncEnumerable<TElement>
2093 references to IAsyncEnumerable
aspire (26)
Backchannel\AppHostBackchannel.cs (16)
19IAsyncEnumerable<BackchannelLogEntry> GetAppHostLogEntriesAsync(CancellationToken cancellationToken); 20IAsyncEnumerable<RpcResourceState> GetResourceStatesAsync(CancellationToken cancellationToken); 22IAsyncEnumerable<PublishingActivity> GetPublishingActivitiesAsync(CancellationToken cancellationToken); 25IAsyncEnumerable<CommandOutput> ExecAsync(CancellationToken cancellationToken); 80public async IAsyncEnumerable<BackchannelLogEntry> GetAppHostLogEntriesAsync([EnumeratorCancellation] CancellationToken cancellationToken) 87var logEntries = await rpc.InvokeWithCancellationAsync<IAsyncEnumerable<BackchannelLogEntry>>( 100public async IAsyncEnumerable<RpcResourceState> GetResourceStatesAsync([EnumeratorCancellation] CancellationToken cancellationToken) 107var resourceStates = await rpc.InvokeWithCancellationAsync<IAsyncEnumerable<RpcResourceState>>( 166public async IAsyncEnumerable<PublishingActivity> GetPublishingActivitiesAsync([EnumeratorCancellation] CancellationToken cancellationToken) 173var publishingActivities = await rpc.InvokeWithCancellationAsync<IAsyncEnumerable<PublishingActivity>>( 214public async IAsyncEnumerable<CommandOutput> ExecAsync([EnumeratorCancellation] CancellationToken cancellationToken) 220var commandOutputs = await rpc.InvokeWithCancellationAsync<IAsyncEnumerable<CommandOutput>>(
Backchannel\BackchannelJsonSerializerContext.cs (4)
18[JsonSerializable(typeof(IAsyncEnumerable<RpcResourceState>))] 20[JsonSerializable(typeof(IAsyncEnumerable<BackchannelLogEntry>))] 22[JsonSerializable(typeof(IAsyncEnumerable<PublishingActivity>))] 27[JsonSerializable(typeof(IAsyncEnumerable<CommandOutput>))]
Commands\ExecCommand.cs (1)
182var outputStream = backchannel.ExecAsync(cancellationToken);
Commands\PublishCommandBase.cs (3)
162var publishingActivities = backchannel.GetPublishingActivitiesAsync(cancellationToken); 232public static async Task<bool> ProcessPublishingActivitiesAsync(IAsyncEnumerable<PublishingActivity> publishingActivities, CancellationToken cancellationToken) 245public async Task<bool> ProcessAndDisplayPublishingActivitiesAsync(IAsyncEnumerable<PublishingActivity> publishingActivities, IAppHostBackchannel backchannel, CancellationToken cancellationToken)
Commands\RunCommand.cs (2)
200var resourceStates = backchannel.GetResourceStatesAsync(cancellationToken); 306var logEntries = backchannel.GetAppHostLogEntriesAsync(cancellationToken);
Aspire.Cli.Tests (15)
Commands\PublishCommandPromptingIntegrationTests.cs (4)
572public async IAsyncEnumerable<PublishingActivity> GetPublishingActivitiesAsync([EnumeratorCancellation] CancellationToken cancellationToken) 629public async IAsyncEnumerable<BackchannelLogEntry> GetAppHostLogEntriesAsync([EnumeratorCancellation] CancellationToken cancellationToken) 634public async IAsyncEnumerable<RpcResourceState> GetResourceStatesAsync([EnumeratorCancellation] CancellationToken cancellationToken) 642public async IAsyncEnumerable<CommandOutput> ExecAsync([EnumeratorCancellation] CancellationToken cancellationToken)
Commands\RunCommandTests.cs (1)
147private async IAsyncEnumerable<BackchannelLogEntry> ReturnLogEntriesUntilCancelledAsync([EnumeratorCancellation] CancellationToken cancellationToken)
E2E\ExecTests.cs (1)
149var outputStream = appHostRpcTarget.ExecAsync(cts.Token);
TestServices\TestAppHostBackchannel.cs (7)
21public Func<CancellationToken, IAsyncEnumerable<RpcResourceState>>? GetResourceStatesAsyncCallback { get; set; } 24public Func<CancellationToken, IAsyncEnumerable<BackchannelLogEntry>>? GetAppHostLogEntriesAsyncCallback { get; set; } 30public Func<CancellationToken, IAsyncEnumerable<PublishingActivity>>? GetPublishingActivitiesAsyncCallback { get; set; } 64public async IAsyncEnumerable<RpcResourceState> GetResourceStatesAsync([EnumeratorCancellation]CancellationToken cancellationToken) 110public async IAsyncEnumerable<PublishingActivity> GetPublishingActivitiesAsync([EnumeratorCancellation]CancellationToken cancellationToken) 228public async IAsyncEnumerable<BackchannelLogEntry> GetAppHostLogEntriesAsync([EnumeratorCancellation]CancellationToken cancellationToken) 245public async IAsyncEnumerable<CommandOutput> ExecAsync([EnumeratorCancellation] CancellationToken cancellationToken)
Utils\EmptyAsyncEnumerable.cs (2)
13/// Gets a singleton instance of an empty <see cref="IAsyncEnumerable{T}"/>. 15public static readonly IAsyncEnumerable<T> Instance = new EmptyAsyncEnumerableImpl();
Aspire.Components.Common.TestUtilities (1)
ActivityNotifier.cs (1)
39private async IAsyncEnumerable<Activity> WaitAsync([EnumeratorCancellation] CancellationToken cancellationToken)
Aspire.Dashboard (12)
Components\Interactions\InteractionsProvider.cs (1)
288var interactions = DashboardClient.SubscribeInteractionsAsync(_cts.Token);
Components\Pages\ConsoleLogs.razor.cs (1)
499var subscription = DashboardClient.SubscribeConsoleLogs(newConsoleLogsSubscription.Name, newConsoleLogsSubscription.CancellationToken);
ServiceClient\DashboardClient.cs (5)
577async IAsyncEnumerable<IReadOnlyList<ResourceViewModelChange>> StreamUpdatesAsync([EnumeratorCancellation] CancellationToken enumeratorCancellationToken = default) 601public IAsyncEnumerable<WatchInteractionsResponseUpdate> SubscribeInteractionsAsync(CancellationToken cancellationToken) 620async IAsyncEnumerable<WatchInteractionsResponseUpdate> StreamUpdatesAsync(List<WatchInteractionsResponseUpdate> pendingInteractions, [EnumeratorCancellation] CancellationToken enumeratorCancellationToken = default) 642public async IAsyncEnumerable<IReadOnlyList<ResourceLogLine>> SubscribeConsoleLogs(string resourceName, [EnumeratorCancellation] CancellationToken cancellationToken) 690public async IAsyncEnumerable<IReadOnlyList<ResourceLogLine>> GetConsoleLogs(string resourceName, [EnumeratorCancellation] CancellationToken cancellationToken)
ServiceClient\IDashboardClient.cs (4)
44IAsyncEnumerable<WatchInteractionsResponseUpdate> SubscribeInteractionsAsync(CancellationToken cancellationToken); 58IAsyncEnumerable<IReadOnlyList<ResourceLogLine>> SubscribeConsoleLogs(string resourceName, CancellationToken cancellationToken); 60IAsyncEnumerable<IReadOnlyList<ResourceLogLine>> GetConsoleLogs(string resourceName, CancellationToken cancellationToken); 67IAsyncEnumerable<IReadOnlyList<ResourceViewModelChange>> Subscription);
src\Shared\ChannelExtensions.cs (1)
25public static async IAsyncEnumerable<IReadOnlyList<T>> GetBatchesAsync<T>(
Aspire.Dashboard.Components.Tests (10)
Controls\ApplicationNameTests.cs (3)
81public IAsyncEnumerable<IReadOnlyList<ResourceLogLine>> GetConsoleLogs(string resourceName, CancellationToken cancellationToken) => throw new NotImplementedException(); 83public IAsyncEnumerable<IReadOnlyList<ResourceLogLine>> SubscribeConsoleLogs(string resourceName, CancellationToken cancellationToken) => throw new NotImplementedException(); 84public IAsyncEnumerable<WatchInteractionsResponseUpdate> SubscribeInteractionsAsync(CancellationToken cancellationToken) => throw new NotImplementedException();
Shared\TestDashboardClient.cs (5)
58public async IAsyncEnumerable<IReadOnlyList<ResourceLogLine>> SubscribeConsoleLogs(string resourceName, [EnumeratorCancellation] CancellationToken cancellationToken) 73public IAsyncEnumerable<IReadOnlyList<ResourceLogLine>> GetConsoleLogs(string resourceName, CancellationToken cancellationToken) 89async static IAsyncEnumerable<IReadOnlyList<ResourceViewModelChange>> BuildSubscription(Channel<IReadOnlyList<ResourceViewModelChange>> channel, [EnumeratorCancellation] CancellationToken cancellationToken) 98public IAsyncEnumerable<WatchInteractionsResponseUpdate> SubscribeInteractionsAsync(CancellationToken cancellationToken) 109async static IAsyncEnumerable<WatchInteractionsResponseUpdate> BuildSubscription(Channel<WatchInteractionsResponseUpdate> channel, [EnumeratorCancellation] CancellationToken cancellationToken)
tests\Shared\AsyncTestHelpers.cs (2)
51public static async IAsyncEnumerable<T> DefaultTimeout<T>(this IAsyncEnumerable<T> asyncEnumerable, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
Aspire.Dashboard.Tests (12)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (4)
37public IAsyncEnumerable<IReadOnlyList<ResourceLogLine>> SubscribeConsoleLogs(string resourceName, CancellationToken cancellationToken) => throw new NotImplementedException(); 38public IAsyncEnumerable<IReadOnlyList<ResourceLogLine>> GetConsoleLogs(string resourceName, CancellationToken cancellationToken) => throw new NotImplementedException(); 48private static async IAsyncEnumerable<IReadOnlyList<ResourceViewModelChange>> Test() 54public IAsyncEnumerable<WatchInteractionsResponseUpdate> SubscribeInteractionsAsync(CancellationToken cancellationToken)
Model\DashboardClientTests.cs (2)
162var subscription = client.SubscribeInteractionsAsync(CancellationToken.None); 189var subscription = client.SubscribeInteractionsAsync(CancellationToken.None);
ResourceOutgoingPeerResolverTests.cs (4)
176async IAsyncEnumerable<IReadOnlyList<ResourceViewModelChange>> GetChanges([EnumeratorCancellation] CancellationToken cancellationToken = default) 229public IAsyncEnumerable<IReadOnlyList<ResourceLogLine>> GetConsoleLogs(string resourceName, CancellationToken cancellationToken) => throw new NotImplementedException(); 231public IAsyncEnumerable<IReadOnlyList<ResourceLogLine>> SubscribeConsoleLogs(string resourceName, CancellationToken cancellationToken) => throw new NotImplementedException(); 232public IAsyncEnumerable<WatchInteractionsResponseUpdate> SubscribeInteractionsAsync(CancellationToken cancellationToken) => throw new NotImplementedException();
tests\Shared\AsyncTestHelpers.cs (2)
51public static async IAsyncEnumerable<T> DefaultTimeout<T>(this IAsyncEnumerable<T> asyncEnumerable, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
Aspire.Hosting (52)
ApplicationModel\InteractionService.cs (1)
256internal async IAsyncEnumerable<Interaction> SubscribeInteractionUpdates([EnumeratorCancellation] CancellationToken cancellationToken = default)
ApplicationModel\ResourceLoggerService.cs (11)
155public IAsyncEnumerable<IReadOnlyList<LogLine>> GetAllAsync(IResource resource) 175public IAsyncEnumerable<IReadOnlyList<LogLine>> WatchAsync(IResource resource) 195public IAsyncEnumerable<IReadOnlyList<LogLine>> GetAllAsync(string resourceName) 207public IAsyncEnumerable<IReadOnlyList<LogLine>> WatchAsync(string resourceName) 221public async IAsyncEnumerable<LogSubscriber> WatchAnySubscribersAsync([EnumeratorCancellation] CancellationToken cancellationToken = default) 295private static async IAsyncEnumerable<IReadOnlyList<LogLine>> CombineMultipleAsync(string[] resourceNames, Func<string, IAsyncEnumerable<IReadOnlyList<LogLine>>> fetch) 391public async IAsyncEnumerable<IReadOnlyList<LogLine>> GetAllAsync(IConsoleLogsService consoleLogsService, [EnumeratorCancellation] CancellationToken cancellationToken = default) 393var consoleLogsEnumerable = consoleLogsService.GetAllLogsAsync(_name, cancellationToken); 414public async IAsyncEnumerable<IReadOnlyList<LogLine>> WatchAsync([EnumeratorCancellation] CancellationToken cancellationToken = default) 619public IAsyncEnumerable<IReadOnlyList<LogEntry>> GetAllLogsAsync(string resourceName, CancellationToken cancellationToken)
ApplicationModel\ResourceNotificationService.cs (1)
458public async IAsyncEnumerable<ResourceEvent> WatchAsync([EnumeratorCancellation] CancellationToken cancellationToken = default)
Backchannel\AppHostRpcTarget.cs (7)
35public async IAsyncEnumerable<BackchannelLogEntry> GetAppHostLogEntriesAsync([EnumeratorCancellation] CancellationToken cancellationToken) 39var logEntries = channel.Reader.ReadAllAsync(cancellationToken); 53public async IAsyncEnumerable<PublishingActivity> GetPublishingActivitiesAsync([EnumeratorCancellation] CancellationToken cancellationToken) 69public async IAsyncEnumerable<RpcResourceState> GetResourceStatesAsync([EnumeratorCancellation] CancellationToken cancellationToken) 71var resourceEvents = resourceNotificationService.WatchAsync(cancellationToken); 176public async IAsyncEnumerable<CommandOutput> ExecAsync([EnumeratorCancellation] CancellationToken cancellationToken) 179var logsStream = execResourceManager.StreamExecResourceLogs(cancellationToken);
Dashboard\DashboardService.cs (2)
64var updates = serviceData.SubscribeInteractionUpdates(); 271var enumerable = suppressFollow
Dashboard\DashboardServiceData.cs (7)
109internal IAsyncEnumerable<Interaction> SubscribeInteractionUpdates() 119internal IAsyncEnumerable<IReadOnlyList<LogLine>>? SubscribeConsoleLogs(string resourceName) 121var sequence = _resourceLoggerService.WatchAsync(resourceName); 125async IAsyncEnumerable<IReadOnlyList<LogLine>> Enumerate([EnumeratorCancellation] CancellationToken cancellationToken = default) 136internal IAsyncEnumerable<IReadOnlyList<LogLine>>? GetConsoleLogs(string resourceName) 138var sequence = _resourceLoggerService.GetAllAsync(resourceName); 142async IAsyncEnumerable<IReadOnlyList<LogLine>> Enumerate([EnumeratorCancellation] CancellationToken cancellationToken = default)
Dashboard\ResourcePublisher.cs (2)
58async IAsyncEnumerable<IReadOnlyList<ResourceSnapshotChange>> StreamUpdates([EnumeratorCancellation] CancellationToken enumeratorCancellationToken = default) 113IAsyncEnumerable<IReadOnlyList<ResourceSnapshotChange>> Subscription);
Dcp\DcpExecutor.cs (4)
445public async IAsyncEnumerable<IReadOnlyList<LogEntry>> GetAllLogsAsync(string resourceName, [EnumeratorCancellation] CancellationToken cancellationToken) 447IAsyncEnumerable<IReadOnlyList<(string, bool)>>? enumerable = null; 491IAsyncEnumerable<IReadOnlyList<(string, bool)>>? enumerable = resource switch 654var serviceChangeEnumerator = _kubernetesService.WatchAsync<Service>(cancellationToken: attemptCancellationToken);
Dcp\KubernetesService.cs (2)
47IAsyncEnumerable<(WatchEventType, T)> WatchAsync<T>( 255public async IAsyncEnumerable<(WatchEventType, T)> WatchAsync<T>(
Devcontainers\Codespaces\CodespacesResourceUrlRewriterService.cs (1)
26var resourceEvents = resourceNotificationService.WatchAsync(stoppingToken);
Exec\ExecResourceManager.cs (1)
40public async IAsyncEnumerable<CommandOutput> StreamExecResourceLogs([EnumeratorCancellation] CancellationToken cancellationToken)
Health\ResourceHealthCheckService.cs (1)
26var resourceEvents = resourceNotificationService.WatchAsync(stoppingToken);
IConsoleLogsService.cs (1)
8IAsyncEnumerable<IReadOnlyList<LogEntry>> GetAllLogsAsync(string resourceName, CancellationToken cancellationToken);
src\Shared\ChannelExtensions.cs (1)
25public static async IAsyncEnumerable<IReadOnlyList<T>> GetBatchesAsync<T>(
Utils\PeriodicRestartAsyncEnumerable.cs (10)
16/// <param name="enumerableFactory">Factory method that takes the last iterrated value (if one exists) and a <see cref="CancellationToken"/> and returns a fresh <see cref="IAsyncEnumerable{T}"/> to enumerate over</param> 19/// <returns>An <see cref="IAsyncEnumerable{T}"/> of items returned by the inner iterables</returns> 20public static async IAsyncEnumerable<T> CreateAsync<T>(Func<T?, CancellationToken, Task<IAsyncEnumerable<T>>> enumerableFactory, TimeSpan restartInterval, [EnumeratorCancellation] CancellationToken cancellationToken) where T : struct 29var enumerable = await enumerableFactory(lastValue, cts.Token).ConfigureAwait(false); 72/// <param name="enumerableFactory">Factory method that takes the last iterrated value (if one exists) and a <see cref="CancellationToken"/> and returns a fresh <see cref="IAsyncEnumerable{T}"/> to enumerate over</param> 75/// <returns>An <see cref="IAsyncEnumerable{T}"/> of items returned by the inner iterables</returns> 76public static async IAsyncEnumerable<T> CreateAsync<T>(Func<T?, CancellationToken, Task<IAsyncEnumerable<T>>> enumerableFactory, TimeSpan restartInterval, [EnumeratorCancellation] CancellationToken cancellationToken) where T : class? 85var enumerable = await enumerableFactory(lastValue, cts.Token).ConfigureAwait(false);
Aspire.Hosting.Azure.AIFoundry (1)
AzureAIFoundryExtensions.cs (1)
206var result = manager.DownloadModelWithProgressAsync(model, ct: ct);
Aspire.Hosting.Kafka.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
51public static async IAsyncEnumerable<T> DefaultTimeout<T>(this IAsyncEnumerable<T> asyncEnumerable, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
Aspire.Hosting.MySql.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
51public static async IAsyncEnumerable<T> DefaultTimeout<T>(this IAsyncEnumerable<T> asyncEnumerable, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
Aspire.Hosting.NodeJs.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
51public static async IAsyncEnumerable<T> DefaultTimeout<T>(this IAsyncEnumerable<T> asyncEnumerable, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
Aspire.Hosting.PostgreSQL.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
51public static async IAsyncEnumerable<T> DefaultTimeout<T>(this IAsyncEnumerable<T> asyncEnumerable, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
Aspire.Hosting.RabbitMQ.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
51public static async IAsyncEnumerable<T> DefaultTimeout<T>(this IAsyncEnumerable<T> asyncEnumerable, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
Aspire.Hosting.Testing.Tests (2)
tests\Shared\ConsoleLogging\ConsoleLoggingTestHelpers.cs (2)
10var watchEnumerable = service.WatchAsync(resource); 14public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerable<IReadOnlyList<LogLine>> watchEnumerable, int targetLogCount)
Aspire.Hosting.Tests (17)
Backchannel\AppHostBackchannelTests.cs (2)
122var resourceEvents = await rpc.InvokeAsync<IAsyncEnumerable<RpcResourceState>>(
Dcp\DcpExecutorTests.cs (5)
590var watchSubscribers = resourceLoggerService.WatchAnySubscribersAsync(); 592var watchLogs = resourceLoggerService.WatchAsync(exeResource.Metadata.Name); 687var watchSubscribers = resourceLoggerService.WatchAnySubscribersAsync(); 689var watchLogs1 = resourceLoggerService.WatchAsync(exeResource.Metadata.Name); 711var watchLogs2 = resourceLoggerService.WatchAsync(exeResource.Metadata.Name);
Dcp\TestKubernetesService.cs (1)
132public async IAsyncEnumerable<(WatchEventType, T)> WatchAsync<T>(string? namespaceParameter = null, [EnumeratorCancellation] CancellationToken cancellationToken = default) where T : CustomResource
InteractionServiceTests.cs (1)
121var subscription = interactionService.SubscribeInteractionUpdates();
tests\Shared\AsyncTestHelpers.cs (2)
51public static async IAsyncEnumerable<T> DefaultTimeout<T>(this IAsyncEnumerable<T> asyncEnumerable, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
tests\Shared\ConsoleLogging\ConsoleLoggingTestHelpers.cs (2)
10var watchEnumerable = service.WatchAsync(resource); 14public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerable<IReadOnlyList<LogLine>> watchEnumerable, int targetLogCount)
Utils\Grpc\TestServerStreamWriter.cs (1)
28public IAsyncEnumerable<T> ReadAllAsync()
Utils\PeriodicRestartAsyncEnumerableTests.cs (2)
59static async IAsyncEnumerable<int> CountingAsyncEnumerable(int start, TimeSpan delay, [EnumeratorCancellation] CancellationToken cancellationToken) 71static async IAsyncEnumerable<int> RefCountingAsyncEnumerable(int start, TimeSpan delay, [EnumeratorCancellation] CancellationToken cancellationToken)
Utils\TestConsoleLogsService.cs (1)
19public async IAsyncEnumerable<IReadOnlyList<LogEntry>> GetAllLogsAsync(string resourceName, [EnumeratorCancellation] CancellationToken cancellationToken)
Aspire.Hosting.Valkey.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
51public static async IAsyncEnumerable<T> DefaultTimeout<T>(this IAsyncEnumerable<T> asyncEnumerable, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
Aspire.Playground.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
51public static async IAsyncEnumerable<T> DefaultTimeout<T>(this IAsyncEnumerable<T> asyncEnumerable, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
CatalogDb (2)
Model.cs (2)
12private static readonly Func<CatalogDbContext, int?, int?, int?, int, IAsyncEnumerable<CatalogItem>> s_getCatalogItemsQuery = 97private static async Task<List<T>> ToListAsync<T>(IAsyncEnumerable<T> asyncEnumerable)
CatalogModel (2)
Model.cs (2)
15private static readonly Func<CatalogDbContext, int?, int?, int?, int, IAsyncEnumerable<CatalogItem>> s_getCatalogItemsQuery = 100private static async Task<List<T>> ToListAsync<T>(IAsyncEnumerable<T> asyncEnumerable)
FormatterWebSite (5)
Controllers\AsyncEnumerableController.cs (4)
13public IAsyncEnumerable<Project> GetAllProjects() 17public async Task<IAsyncEnumerable<Project>> GetAllProjectsAsTask() 24public IAsyncEnumerable<Project> GetAllProjectsWithError() 27public async IAsyncEnumerable<Project> GetAllProjectsCore(bool throwError = false)
Controllers\SystemTextJsonOutputFormatterController.cs (1)
23public async IAsyncEnumerable<int> AsyncEnumerable()
GenerateDocumentationAndConfigFiles (27)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (12)
19public static readonly IAsyncEnumerable<T> Empty = GetEmptyAsync(); 22private static async IAsyncEnumerable<T> GetEmptyAsync() 30internal static async IAsyncEnumerable<T> SingletonAsync<T>(T value) 36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken) 46/// Takes an array of <see cref="IAsyncEnumerable{T}"/>s and produces a single resultant <see 47/// cref="IAsyncEnumerable{T}"/> with all their values merged together. Absolutely no ordering guarantee is 52/// cref="IAsyncEnumerable{T}"/>, but one final stream is desired as the result.</remarks> 53public static IAsyncEnumerable<T> MergeAsync<T>(this ImmutableArray<IAsyncEnumerable<T>> streams, CancellationToken cancellationToken) 74static async Task ProcessAsync(IAsyncEnumerable<T> stream, ChannelWriter<T> writer, CancellationToken cancellationToken) 81public static async IAsyncEnumerable<T> ReadAllAsync<T>( 106public static async IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IEnumerable<TSource> source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
84Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 107Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 119IAsyncEnumerable<TSource> source, 121Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 156IAsyncEnumerable<TSource> source, 177Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189IAsyncEnumerable<TSource> source, 191Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 222IAsyncEnumerable<TSource> source, 241IAsyncEnumerable<TSource> source, 265public static IAsyncEnumerable<TItem> RunAsync<TArgs>( 301/// but returns value as an <see cref="IAsyncEnumerable{TItem}"/>. Versus an <see cref="ImmutableArray{TItem}"/>. 305public static IAsyncEnumerable<TItem> RunParallelStreamAsync<TSource, TArgs>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.cs (2)
44IAsyncEnumerable<TSource> source, 56IAsyncEnumerable<TSource> source,
Metrics (36)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (12)
19public static readonly IAsyncEnumerable<T> Empty = GetEmptyAsync(); 22private static async IAsyncEnumerable<T> GetEmptyAsync() 30internal static async IAsyncEnumerable<T> SingletonAsync<T>(T value) 36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken) 46/// Takes an array of <see cref="IAsyncEnumerable{T}"/>s and produces a single resultant <see 47/// cref="IAsyncEnumerable{T}"/> with all their values merged together. Absolutely no ordering guarantee is 52/// cref="IAsyncEnumerable{T}"/>, but one final stream is desired as the result.</remarks> 53public static IAsyncEnumerable<T> MergeAsync<T>(this ImmutableArray<IAsyncEnumerable<T>> streams, CancellationToken cancellationToken) 74static async Task ProcessAsync(IAsyncEnumerable<T> stream, ChannelWriter<T> writer, CancellationToken cancellationToken) 81public static async IAsyncEnumerable<T> ReadAllAsync<T>( 106public static async IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IEnumerable<TSource> source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
84Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 107Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 119IAsyncEnumerable<TSource> source, 121Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 156IAsyncEnumerable<TSource> source, 177Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189IAsyncEnumerable<TSource> source, 191Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 222IAsyncEnumerable<TSource> source, 241IAsyncEnumerable<TSource> source, 265public static IAsyncEnumerable<TItem> RunAsync<TArgs>( 301/// but returns value as an <see cref="IAsyncEnumerable{TItem}"/>. Versus an <see cref="ImmutableArray{TItem}"/>. 305public static IAsyncEnumerable<TItem> RunParallelStreamAsync<TSource, TArgs>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.cs (2)
44IAsyncEnumerable<TSource> source, 56IAsyncEnumerable<TSource> source,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (9)
212/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 219public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 229/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 237public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 247/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 254public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 269/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 278private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 614IAsyncEnumerable<TSource> source, Func<object, Task> taskBody,
Metrics.Legacy (36)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (12)
19public static readonly IAsyncEnumerable<T> Empty = GetEmptyAsync(); 22private static async IAsyncEnumerable<T> GetEmptyAsync() 30internal static async IAsyncEnumerable<T> SingletonAsync<T>(T value) 36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken) 46/// Takes an array of <see cref="IAsyncEnumerable{T}"/>s and produces a single resultant <see 47/// cref="IAsyncEnumerable{T}"/> with all their values merged together. Absolutely no ordering guarantee is 52/// cref="IAsyncEnumerable{T}"/>, but one final stream is desired as the result.</remarks> 53public static IAsyncEnumerable<T> MergeAsync<T>(this ImmutableArray<IAsyncEnumerable<T>> streams, CancellationToken cancellationToken) 74static async Task ProcessAsync(IAsyncEnumerable<T> stream, ChannelWriter<T> writer, CancellationToken cancellationToken) 81public static async IAsyncEnumerable<T> ReadAllAsync<T>( 106public static async IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IEnumerable<TSource> source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
84Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 107Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 119IAsyncEnumerable<TSource> source, 121Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 156IAsyncEnumerable<TSource> source, 177Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189IAsyncEnumerable<TSource> source, 191Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 222IAsyncEnumerable<TSource> source, 241IAsyncEnumerable<TSource> source, 265public static IAsyncEnumerable<TItem> RunAsync<TArgs>( 301/// but returns value as an <see cref="IAsyncEnumerable{TItem}"/>. Versus an <see cref="ImmutableArray{TItem}"/>. 305public static IAsyncEnumerable<TItem> RunParallelStreamAsync<TSource, TArgs>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.cs (2)
44IAsyncEnumerable<TSource> source, 56IAsyncEnumerable<TSource> source,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (9)
212/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 219public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 229/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 237public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 247/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 254public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 269/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 278private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 614IAsyncEnumerable<TSource> source, Func<object, Task> taskBody,
Microsoft.AspNetCore.Components.Server (1)
ComponentHub.cs (1)
481public async IAsyncEnumerable<ArraySegment<byte>> SendDotNetStreamToJS(long streamId)
Microsoft.AspNetCore.Http.Extensions.Tests (12)
HttpResponseJsonExtensionsTests.cs (11)
276async IAsyncEnumerable<int> AsyncEnumerable() 293await context.Response.WriteAsJsonAsync(AsyncEnumerable(), typeof(IAsyncEnumerable<int>)); 301async IAsyncEnumerable<int> AsyncEnumerable() 331async IAsyncEnumerable<int> AsyncEnumerable([EnumeratorCancellation] CancellationToken cancellationToken = default) 355await context.Response.WriteAsJsonAsync(AsyncEnumerable(), typeof(IAsyncEnumerable<int>)); 365async IAsyncEnumerable<int> AsyncEnumerable([EnumeratorCancellation] CancellationToken cancellationToken = default) 389await Assert.ThrowsAnyAsync<OperationCanceledException>(() => context.Response.WriteAsJsonAsync(AsyncEnumerable(), typeof(IAsyncEnumerable<int>), cts.Token)); 399async IAsyncEnumerable<int> AsyncEnumerable([EnumeratorCancellation] CancellationToken cancellationToken = default) 433async IAsyncEnumerable<int> AsyncEnumerable([EnumeratorCancellation] CancellationToken cancellationToken = default) 496app.MapGet("/", IAsyncEnumerable<int> (HttpContext httpContext) => 500async IAsyncEnumerable<int> AsyncEnum()
RequestDelegateGenerator\SharedTypes.cs (1)
104[JsonSerializable(typeof(IAsyncEnumerable<JsonTodo>))]
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (1)
104[JsonSerializable(typeof(IAsyncEnumerable<JsonTodo>))]
Microsoft.AspNetCore.Http.Results (12)
Results.cs (3)
992public static IResult ServerSentEvents(IAsyncEnumerable<string> values, string? eventType = null) 1008public static IResult ServerSentEvents<T>(IAsyncEnumerable<T> values, string? eventType = null) 1022public static IResult ServerSentEvents<T>(IAsyncEnumerable<SseItem<T>> values)
ServerSentEventsResult.cs (6)
23private readonly IAsyncEnumerable<SseItem<T>> _events; 28internal ServerSentEventsResult(IAsyncEnumerable<T> events, string? eventType) 33internal ServerSentEventsResult(IAsyncEnumerable<SseItem<T>> events) 55if (_events is IAsyncEnumerable<SseItem<string>> stringEvents) 94private static async IAsyncEnumerable<SseItem<T>> WrapEvents(IAsyncEnumerable<T> events, string? eventType = null)
TypedResults.cs (3)
1082public static ServerSentEventsResult<string> ServerSentEvents(IAsyncEnumerable<string> values, string? eventType = null) 1098public static ServerSentEventsResult<T> ServerSentEvents<T>(IAsyncEnumerable<T> values, string? eventType = null) 1112public static ServerSentEventsResult<T> ServerSentEvents<T>(IAsyncEnumerable<SseItem<T>> values)
Microsoft.AspNetCore.Http.Results.Tests (18)
HttpResultsHelperTests.cs (3)
186var value = GetTodosAsync(); 221private static async IAsyncEnumerable<JsonTodo> GetTodosAsync() 253[JsonSerializable(typeof(IAsyncEnumerable<JsonTodo>))]
ServerSentEventsResultTests.cs (15)
26var events = AsyncEnumerable.Empty<string>(); 44var events = new[] { "event1\"with\"quotes", "event2" }.ToAsyncEnumerable(); 65var events = new[] { "event1", "event2" }.ToAsyncEnumerable(); 82var events = new[] { new SseItem<string>("event1", "custom-event") }.ToAsyncEnumerable(); 98var events = AsyncEnumerable.Empty<string>(); 111var events = new string[] { null }.ToAsyncEnumerable(); 146var events = new[] { testObject }.ToAsyncEnumerable(); 163var events = new[] { new SseItem<TestObject>(testObject) }.ToAsyncEnumerable(); 191var events = new[] { testObject }.ToAsyncEnumerable(); 208var events = new TestObject[] { baseClass }.ToAsyncEnumerable(); 230var events = GetEvents(cts.Token); 248async IAsyncEnumerable<string> GetEvents([EnumeratorCancellation] CancellationToken cancellationToken = default) 270var events = AsyncEnumerable.Empty<string>(); 292var events = new[] { new SseItem<byte[]>(bytes) }.ToAsyncEnumerable(); 311var events = new[] { new SseItem<byte[]>(null) }.ToAsyncEnumerable();
Microsoft.AspNetCore.Mvc.Core (9)
Infrastructure\AsyncEnumerableReader.cs (7)
20/// Type that reads an <see cref="IAsyncEnumerable{T}"/> instance into a 25/// an <see cref="IAsyncEnumerable{T}"/>. An accurate <see cref="ICollection{T}"/> is required for XML formatters to 47/// Attempts to produces a delegate that reads an <see cref="IAsyncEnumerable{T}"/> into an <see cref="ICollection{T}"/>. 50/// <param name="reader">A delegate that when awaited reads the <see cref="IAsyncEnumerable{T}"/>.</param> 51/// <returns><see langword="true" /> when <paramref name="type"/> is an instance of <see cref="IAsyncEnumerable{T}"/>, othwerise <see langword="false"/>.</returns> 56var enumerableType = ClosedGenericMatcher.ExtractGenericInterface(type, typeof(IAsyncEnumerable<>)); 81var asyncEnumerable = ((IAsyncEnumerable<T>)value).WithCancellation(cancellationToken);
MvcOptions.cs (2)
361/// Gets or sets the most number of entries of an <see cref="IAsyncEnumerable{T}"/> that 364/// When <see cref="ObjectResult.Value" /> is an instance of <see cref="IAsyncEnumerable{T}"/>,
Microsoft.AspNetCore.Mvc.Core.Test (34)
Formatters\SystemTextJsonOutputFormatterTest.cs (8)
99var asyncEnumerable = LargeAsync(); 128var asyncEnumerable = AsyncEnumerableClosedConnection(); 147async IAsyncEnumerable<int> AsyncEnumerableClosedConnection([EnumeratorCancellation] CancellationToken cancellationToken = default) 223var people = GetPeopleAsync(); 234typeof(IAsyncEnumerable<JsonPerson>), 248private static async IAsyncEnumerable<JsonPerson> GetPeopleAsync() 314[JsonSerializable(typeof(IAsyncEnumerable<JsonPerson>))] 335private static async IAsyncEnumerable<int> LargeAsync()
Infrastructure\AsyncEnumerableReaderTest.cs (20)
20var asyncEnumerable = TestEnumerable(); 35var asyncEnumerable = TestEnumerable(); 53var asyncEnumerable = PrimitiveEnumerable(); 71var asyncEnumerable1 = TestEnumerable(); 72var asyncEnumerable2 = TestEnumerable(); 105var asyncEnumerable1 = TestEnumerable(); 106var asyncEnumerable2 = TestEnumerable(); 123var asyncEnumerable1 = TestEnumerable(); 124var asyncEnumerable2 = TestEnumerable(4); 140var enumerable1 = TestEnumerable(); 141var enumerable2 = TestEnumerable2(); 174var enumerable = TestEnumerable(11); 193var enumerable = ThrowingAsyncEnumerable(); 206var enumerable = AsyncEnumerable(); 219async IAsyncEnumerable<string> AsyncEnumerable([EnumeratorCancellation] CancellationToken cancellationToken = default) 227public static async IAsyncEnumerable<string> TestEnumerable(int count = 3) 236public static async IAsyncEnumerable<string> TestEnumerable2() 243public static async IAsyncEnumerable<int> PrimitiveEnumerable(int count = 3) 259IAsyncEnumerator<object> IAsyncEnumerable<object>.GetAsyncEnumerator(CancellationToken cancellationToken) 263private static async IAsyncEnumerable<string> ThrowingAsyncEnumerable()
Infrastructure\JsonResultExecutorTestBase.cs (6)
382async IAsyncEnumerable<int> AsyncEnumerableClosedConnection([EnumeratorCancellation] CancellationToken cancellationToken = default) 416async IAsyncEnumerable<int> AsyncEnumerableClosedConnection([EnumeratorCancellation] CancellationToken cancellationToken = default) 440async IAsyncEnumerable<int> AsyncEnumerableThrows([EnumeratorCancellation] CancellationToken cancellationToken = default) 465async IAsyncEnumerable<int> AsyncEnumerableThrows([EnumeratorCancellation] CancellationToken cancellationToken = default) 519private async IAsyncEnumerable<string> TestAsyncEnumerable() 526private async IAsyncEnumerable<int> TestAsyncPrimitiveEnumerable()
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (8)
XmlDataContractSerializerOutputFormatterTest.cs (4)
730var asyncEnumerable = AsyncEnumerableClosedConnection(); 744async IAsyncEnumerable<int> AsyncEnumerableClosedConnection([EnumeratorCancellation] CancellationToken cancellationToken = default) 768var asyncEnumerable = AsyncEnumerable(); 780async IAsyncEnumerable<int> AsyncEnumerable()
XmlSerializerOutputFormatterTest.cs (4)
512var asyncEnumerable = AsyncEnumerableClosedConnection(); 526async IAsyncEnumerable<int> AsyncEnumerableClosedConnection([EnumeratorCancellation] CancellationToken cancellationToken = default) 550var asyncEnumerable = AsyncEnumerable(); 562async IAsyncEnumerable<int> AsyncEnumerable()
Microsoft.AspNetCore.Mvc.NewtonsoftJson (7)
src\Mvc\Mvc.Core\src\Infrastructure\AsyncEnumerableReader.cs (7)
20/// Type that reads an <see cref="IAsyncEnumerable{T}"/> instance into a 25/// an <see cref="IAsyncEnumerable{T}"/>. An accurate <see cref="ICollection{T}"/> is required for XML formatters to 47/// Attempts to produces a delegate that reads an <see cref="IAsyncEnumerable{T}"/> into an <see cref="ICollection{T}"/>. 50/// <param name="reader">A delegate that when awaited reads the <see cref="IAsyncEnumerable{T}"/>.</param> 51/// <returns><see langword="true" /> when <paramref name="type"/> is an instance of <see cref="IAsyncEnumerable{T}"/>, othwerise <see langword="false"/>.</returns> 56var enumerableType = ClosedGenericMatcher.ExtractGenericInterface(type, typeof(IAsyncEnumerable<>)); 81var asyncEnumerable = ((IAsyncEnumerable<T>)value).WithCancellation(cancellationToken);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (33)
NewtonsoftJsonOutputFormatterTest.cs (6)
447var asyncEnumerable = AsyncEnumerableClosedConnection(); 465async IAsyncEnumerable<int> AsyncEnumerableClosedConnection([EnumeratorCancellation] CancellationToken cancellationToken = default) 492var asyncEnumerable = AsyncEnumerableThrows(); 505async IAsyncEnumerable<int> AsyncEnumerableThrows([EnumeratorCancellation] CancellationToken cancellationToken = default) 526var asyncEnumerable = AsyncEnumerableThrows(); 543async IAsyncEnumerable<int> AsyncEnumerableThrows([EnumeratorCancellation] CancellationToken cancellationToken = default)
NewtonsoftJsonResultExecutorTest.cs (1)
54async IAsyncEnumerable<string> TestAsyncEnumerable([EnumeratorCancellation] CancellationToken cancellationToken = default)
src\Mvc\Mvc.Core\test\Infrastructure\AsyncEnumerableReaderTest.cs (20)
20var asyncEnumerable = TestEnumerable(); 35var asyncEnumerable = TestEnumerable(); 53var asyncEnumerable = PrimitiveEnumerable(); 71var asyncEnumerable1 = TestEnumerable(); 72var asyncEnumerable2 = TestEnumerable(); 105var asyncEnumerable1 = TestEnumerable(); 106var asyncEnumerable2 = TestEnumerable(); 123var asyncEnumerable1 = TestEnumerable(); 124var asyncEnumerable2 = TestEnumerable(4); 140var enumerable1 = TestEnumerable(); 141var enumerable2 = TestEnumerable2(); 174var enumerable = TestEnumerable(11); 193var enumerable = ThrowingAsyncEnumerable(); 206var enumerable = AsyncEnumerable(); 219async IAsyncEnumerable<string> AsyncEnumerable([EnumeratorCancellation] CancellationToken cancellationToken = default) 227public static async IAsyncEnumerable<string> TestEnumerable(int count = 3) 236public static async IAsyncEnumerable<string> TestEnumerable2() 243public static async IAsyncEnumerable<int> PrimitiveEnumerable(int count = 3) 259IAsyncEnumerator<object> IAsyncEnumerable<object>.GetAsyncEnumerator(CancellationToken cancellationToken) 263private static async IAsyncEnumerable<string> ThrowingAsyncEnumerable()
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (6)
382async IAsyncEnumerable<int> AsyncEnumerableClosedConnection([EnumeratorCancellation] CancellationToken cancellationToken = default) 416async IAsyncEnumerable<int> AsyncEnumerableClosedConnection([EnumeratorCancellation] CancellationToken cancellationToken = default) 440async IAsyncEnumerable<int> AsyncEnumerableThrows([EnumeratorCancellation] CancellationToken cancellationToken = default) 465async IAsyncEnumerable<int> AsyncEnumerableThrows([EnumeratorCancellation] CancellationToken cancellationToken = default) 519private async IAsyncEnumerable<string> TestAsyncEnumerable() 526private async IAsyncEnumerable<int> TestAsyncPrimitiveEnumerable()
Microsoft.AspNetCore.SignalR.Client.Core (36)
HubConnection.cs (6)
670/// A <see cref="IAsyncEnumerable{TResult}"/> that represents the stream. 672public virtual IAsyncEnumerable<TResult> StreamAsyncCore<TResult>(string methodName, object?[] args, CancellationToken cancellationToken = default) 675var stream = CastIAsyncEnumerable<TResult>(methodName, args, cts); 676var cancelableStream = AsyncEnumerableAdapters.MakeCancelableTypedAsyncEnumerable(stream, cts); 680private async IAsyncEnumerable<T> CastIAsyncEnumerable<T>(string methodName, object?[] args, CancellationTokenSource cts) 954private Task SendIAsyncEnumerableStreamItems<T>(ConnectionState connectionState, string streamId, IAsyncEnumerable<T> stream, CancellationTokenSource tokenSource)
HubConnectionExtensions.StreamAsync.cs (22)
24/// A <see cref="IAsyncEnumerable{TResult}"/> that represents the stream. 27public static IAsyncEnumerable<TResult> StreamAsync<TResult>(this HubConnection hubConnection, string methodName, CancellationToken cancellationToken = default) 41/// A <see cref="IAsyncEnumerable{TResult}"/> that represents the stream. 44public static IAsyncEnumerable<TResult> StreamAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, CancellationToken cancellationToken = default) 59/// A <see cref="IAsyncEnumerable{TResult}"/> that represents the stream. 62public static IAsyncEnumerable<TResult> StreamAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, CancellationToken cancellationToken = default) 78/// A <see cref="IAsyncEnumerable{TResult}"/> that represents the stream. 81public static IAsyncEnumerable<TResult> StreamAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, CancellationToken cancellationToken = default) 98/// A <see cref="IAsyncEnumerable{TResult}"/> that represents the stream. 101public static IAsyncEnumerable<TResult> StreamAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, CancellationToken cancellationToken = default) 119/// A <see cref="IAsyncEnumerable{TResult}"/> that represents the stream. 122public static IAsyncEnumerable<TResult> StreamAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, CancellationToken cancellationToken = default) 141/// A <see cref="IAsyncEnumerable{TResult}"/> that represents the stream. 144public static IAsyncEnumerable<TResult> StreamAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, CancellationToken cancellationToken = default) 164/// A <see cref="IAsyncEnumerable{TResult}"/> that represents the stream. 167public static IAsyncEnumerable<TResult> StreamAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, CancellationToken cancellationToken = default) 188/// A <see cref="IAsyncEnumerable{TResult}"/> that represents the stream. 191public static IAsyncEnumerable<TResult> StreamAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, CancellationToken cancellationToken = default) 213/// A <see cref="IAsyncEnumerable{TResult}"/> that represents the stream. 216public static IAsyncEnumerable<TResult> StreamAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, object? arg9, CancellationToken cancellationToken = default) 239/// A <see cref="IAsyncEnumerable{TResult}"/> that represents the stream. 242public static IAsyncEnumerable<TResult> StreamAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, object? arg9, object? arg10, CancellationToken cancellationToken = default)
src\SignalR\common\Shared\AsyncEnumerableAdapters.cs (6)
16public static IAsyncEnumerator<object?> MakeAsyncEnumerator<T>(IAsyncEnumerable<T> asyncEnumerable, CancellationToken cancellationToken = default) 22public static IAsyncEnumerable<T> MakeCancelableTypedAsyncEnumerable<T>(IAsyncEnumerable<T> asyncEnumerable, CancellationTokenSource cts) 73private readonly IAsyncEnumerable<TResult> _asyncEnumerable; 76public CancelableTypedAsyncEnumerable(IAsyncEnumerable<TResult> asyncEnumerable, CancellationTokenSource cts) 148private static readonly MethodInfo _asyncEnumerableGetAsyncEnumeratorMethodInfo = typeof(IAsyncEnumerable<>).GetMethod("GetAsyncEnumerator")!;
src\SignalR\common\Shared\ReflectionHelper.cs (2)
57if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(IAsyncEnumerable<>)) 64if (typeToCheck.IsGenericType && typeToCheck.GetGenericTypeDefinition() == typeof(IAsyncEnumerable<>))
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (22)
HubConnectionTests.cs (13)
457var asyncEnumerable = connection.StreamAsyncCore<int>("Stream", new object[] { streamTo }); 489async IAsyncEnumerable<int> ClientStreamData(int value) 499var stream = ClientStreamData(streamTo); 503var asyncEnumerable = connection.StreamAsync<int>("StreamIAsyncConsumer", stream); 538var asyncEnumerable = connection.StreamAsync<int>("Stream", streamTo); 577var stream = connection.StreamAsync<int>("Stream", 5, cts.Token); 611var stream = connection.StreamAsync<int>("Stream", 1000, cts.Token); 656var asyncEnumerable = connection.StreamAsync<int>("StreamException"); 834async IAsyncEnumerable<string> clientStreamData() 846var stream = clientStreamData(); 881async IAsyncEnumerable<int> clientStreamData() 892var stream = clientStreamData(); 935var stream = connection.StreamAsync<int>("Stream", 1000);
HubConnectionTests.Tracing.cs (3)
266var asyncEnumerable = connection.StreamAsyncCore<int>("Stream", new object[] { streamTo }); 404var stream = connection.StreamAsync<int>("Stream", 1000, cts.Token); 504var asyncEnumerable = connection.StreamAsync<int>("StreamException");
Hubs.cs (6)
50public IAsyncEnumerable<int> StreamIAsyncConsumer(IAsyncEnumerable<int> source) => source; 172public IAsyncEnumerable<int> StreamIAsyncConsumer(IAsyncEnumerable<int> source) => source; 208public IAsyncEnumerable<int> StreamIAsyncConsumer(IAsyncEnumerable<int> source) => source;
Microsoft.AspNetCore.SignalR.Client.Tests (17)
HubConnectionTests.cs (4)
271var result = hubConnection.StreamAsync<int>("testMethod", cancellationToken: new CancellationToken(canceled: true)); 291var asyncEnumerable = hubConnection.StreamAsync<int>("Stream", 1); 322var asyncEnumerable = hubConnection.StreamAsync<int>("Stream", 1, cts.Token); 856mockConnection.Setup(c => c.StreamAsyncCore<object>(It.IsAny<string>(), It.IsAny<object[]>(), It.IsAny<CancellationToken>())).Returns(() => It.IsAny<IAsyncEnumerable<object>>());
HubServerProxyGeneratorTests.cs (13)
38IAsyncEnumerable<int> StreamToClientViaEnumerableWithToken(CancellationToken cancellationToken); 40Task StreamFromClientViaEnumerable(IAsyncEnumerable<int> reader); 44IAsyncEnumerable<int> StreamBidirectionalViaEnumerable(IAsyncEnumerable<float> reader); 45IAsyncEnumerable<int> StreamBidirectionalViaEnumerableWithToken(IAsyncEnumerable<float> reader, CancellationToken cancellationToken); 176var asyncEnumerable = channelForEnumerable.Reader.ReadAllAsync(); 219var asyncEnumerable = channelForEnumerable.Reader.ReadAllAsync(); 230It.Is<object[]>(y => ((object[])y).Any(z => (IAsyncEnumerable<int>)z == asyncEnumerable)), 261var argEnumerable = argChannelForEnumerable.Reader.ReadAllAsync(); 263var retEnumerable = retChannelForEnumerable.Reader.ReadAllAsync(); 284It.Is<object[]>(y => ((object[])y).Any(z => z is IAsyncEnumerable<float>)), 290It.Is<object[]>(y => ((object[])y).Any(z => z is IAsyncEnumerable<float>)),
Microsoft.AspNetCore.SignalR.Core (8)
src\SignalR\common\Shared\AsyncEnumerableAdapters.cs (6)
16public static IAsyncEnumerator<object?> MakeAsyncEnumerator<T>(IAsyncEnumerable<T> asyncEnumerable, CancellationToken cancellationToken = default) 22public static IAsyncEnumerable<T> MakeCancelableTypedAsyncEnumerable<T>(IAsyncEnumerable<T> asyncEnumerable, CancellationTokenSource cts) 73private readonly IAsyncEnumerable<TResult> _asyncEnumerable; 76public CancelableTypedAsyncEnumerable(IAsyncEnumerable<TResult> asyncEnumerable, CancellationTokenSource cts) 148private static readonly MethodInfo _asyncEnumerableGetAsyncEnumeratorMethodInfo = typeof(IAsyncEnumerable<>).GetMethod("GetAsyncEnumerator")!;
src\SignalR\common\Shared\ReflectionHelper.cs (2)
57if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(IAsyncEnumerable<>)) 64if (typeToCheck.IsGenericType && typeToCheck.GetGenericTypeDefinition() == typeof(IAsyncEnumerable<>))
Microsoft.AspNetCore.SignalR.Microbenchmarks (3)
DefaultHubDispatcherBenchmark.cs (3)
174public async IAsyncEnumerable<int> StreamIAsyncEnumerableCount(int count) 184public async IAsyncEnumerable<int> StreamIAsyncEnumerableCountCompletedTask(int count) 204public async Task UploadStreamIAsynEnumerable(IAsyncEnumerable<string> stream)
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
src\SignalR\common\testassets\Tests.Utils\TestClient.cs (1)
118public async IAsyncEnumerable<HubMessage> ListenAsync(string invocationId)
Microsoft.AspNetCore.SignalR.Tests (27)
HubConnectionHandlerTests.cs (3)
4267var listeningMessages = client.ListenAsync(invocationId); 5451public static async Task<IEnumerable<T>> ReadAsync<T>(this IAsyncEnumerable<T> enumerable, int count) 5470public static async Task<IEnumerable<T>> ReadAllAsync<T>(this IAsyncEnumerable<T> enumerable)
HubConnectionHandlerTestUtils\Hubs.cs (13)
368public async IAsyncEnumerable<int> StreamWithClientResult() 737public async IAsyncEnumerable<string> CounterAsyncEnumerable(int count) 746public async IAsyncEnumerable<string> ExceptionAsyncEnumerable() 755public async Task<IAsyncEnumerable<string>> CounterAsyncEnumerableAsync(int count) 832public async IAsyncEnumerable<string> DerivedParameterInterfaceAsyncEnumerable(IDerivedParameterTestObject param) 838public async IAsyncEnumerable<string> DerivedParameterBaseClassAsyncEnumerable(DerivedParameterTestObjectBase param) 844public async IAsyncEnumerable<string> DerivedParameterInterfaceAsyncEnumerableWithCancellation(IDerivedParameterTestObject param, [EnumeratorCancellation] CancellationToken token) 850public async IAsyncEnumerable<string> DerivedParameterBaseClassAsyncEnumerableWithCancellation(DerivedParameterTestObjectBase param, [EnumeratorCancellation] CancellationToken token) 858private readonly IAsyncEnumerable<T> _inner; 860public AsyncEnumerableImpl(IAsyncEnumerable<T> inner) 1108public async IAsyncEnumerable<int> CancelableStreamGeneratedAsyncEnumerable([EnumeratorCancellation] CancellationToken token) 1116public async IAsyncEnumerable<int> CountingCancelableStreamGeneratedAsyncEnumerable(int count, [EnumeratorCancellation] CancellationToken token) 1149public IAsyncEnumerable<int> CancelableStreamCustomAsyncEnumerable()
Internal\ReflectionHelperTests.cs (2)
26typeof(IAsyncEnumerable<object>), 36async IAsyncEnumerable<int> Stream()
NativeAotTests.cs (9)
71var asyncEnumerable = connection.StreamAsync<string>(nameof(AsyncMethodHub.StreamEchoAsyncEnumerable), StreamMessages()); 124private static async IAsyncEnumerable<string> StreamMessages() 132private static async IAsyncEnumerable<int> StreamInts() 233public async IAsyncEnumerable<string> CounterAsyncEnumerable(int count) 264public async IAsyncEnumerable<string> StreamEchoAsyncEnumerable(IAsyncEnumerable<string> source) 272public async IAsyncEnumerable<int> ReturnEnumerableValueType() 299public async Task<string> EnumerableIntParameter(IAsyncEnumerable<object> source) 356public async Task StreamValueType(ILogger<EnumerableValueTypeMethodHub> logger, IAsyncEnumerable<float> source)
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
TestClient.cs (1)
118public async IAsyncEnumerable<HubMessage> ListenAsync(string invocationId)
Microsoft.Bcl.AsyncInterfaces (1)
Microsoft.Bcl.AsyncInterfaces.Forwards.cs (1)
5[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IAsyncEnumerable<>))]
Microsoft.CodeAnalysis.Analyzers (36)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (12)
19public static readonly IAsyncEnumerable<T> Empty = GetEmptyAsync(); 22private static async IAsyncEnumerable<T> GetEmptyAsync() 30internal static async IAsyncEnumerable<T> SingletonAsync<T>(T value) 36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken) 46/// Takes an array of <see cref="IAsyncEnumerable{T}"/>s and produces a single resultant <see 47/// cref="IAsyncEnumerable{T}"/> with all their values merged together. Absolutely no ordering guarantee is 52/// cref="IAsyncEnumerable{T}"/>, but one final stream is desired as the result.</remarks> 53public static IAsyncEnumerable<T> MergeAsync<T>(this ImmutableArray<IAsyncEnumerable<T>> streams, CancellationToken cancellationToken) 74static async Task ProcessAsync(IAsyncEnumerable<T> stream, ChannelWriter<T> writer, CancellationToken cancellationToken) 81public static async IAsyncEnumerable<T> ReadAllAsync<T>( 106public static async IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IEnumerable<TSource> source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
84Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 107Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 119IAsyncEnumerable<TSource> source, 121Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 156IAsyncEnumerable<TSource> source, 177Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189IAsyncEnumerable<TSource> source, 191Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 222IAsyncEnumerable<TSource> source, 241IAsyncEnumerable<TSource> source, 265public static IAsyncEnumerable<TItem> RunAsync<TArgs>( 301/// but returns value as an <see cref="IAsyncEnumerable{TItem}"/>. Versus an <see cref="ImmutableArray{TItem}"/>. 305public static IAsyncEnumerable<TItem> RunParallelStreamAsync<TSource, TArgs>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.cs (2)
44IAsyncEnumerable<TSource> source, 56IAsyncEnumerable<TSource> source,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (9)
212/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 219public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 229/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 237public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 247/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 254public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 269/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 278private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 614IAsyncEnumerable<TSource> source, Func<object, Task> taskBody,
Microsoft.CodeAnalysis.AnalyzerUtilities (36)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (12)
19public static readonly IAsyncEnumerable<T> Empty = GetEmptyAsync(); 22private static async IAsyncEnumerable<T> GetEmptyAsync() 30internal static async IAsyncEnumerable<T> SingletonAsync<T>(T value) 36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken) 46/// Takes an array of <see cref="IAsyncEnumerable{T}"/>s and produces a single resultant <see 47/// cref="IAsyncEnumerable{T}"/> with all their values merged together. Absolutely no ordering guarantee is 52/// cref="IAsyncEnumerable{T}"/>, but one final stream is desired as the result.</remarks> 53public static IAsyncEnumerable<T> MergeAsync<T>(this ImmutableArray<IAsyncEnumerable<T>> streams, CancellationToken cancellationToken) 74static async Task ProcessAsync(IAsyncEnumerable<T> stream, ChannelWriter<T> writer, CancellationToken cancellationToken) 81public static async IAsyncEnumerable<T> ReadAllAsync<T>( 106public static async IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IEnumerable<TSource> source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
84Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 107Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 119IAsyncEnumerable<TSource> source, 121Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 156IAsyncEnumerable<TSource> source, 177Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189IAsyncEnumerable<TSource> source, 191Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 222IAsyncEnumerable<TSource> source, 241IAsyncEnumerable<TSource> source, 265public static IAsyncEnumerable<TItem> RunAsync<TArgs>( 301/// but returns value as an <see cref="IAsyncEnumerable{TItem}"/>. Versus an <see cref="ImmutableArray{TItem}"/>. 305public static IAsyncEnumerable<TItem> RunParallelStreamAsync<TSource, TArgs>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.cs (2)
44IAsyncEnumerable<TSource> source, 56IAsyncEnumerable<TSource> source,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (9)
212/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 219public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 229/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 237public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 247/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 254public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 269/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 278private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 614IAsyncEnumerable<TSource> source, Func<object, Task> taskBody,
Microsoft.CodeAnalysis.BannedApiAnalyzers (36)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (12)
19public static readonly IAsyncEnumerable<T> Empty = GetEmptyAsync(); 22private static async IAsyncEnumerable<T> GetEmptyAsync() 30internal static async IAsyncEnumerable<T> SingletonAsync<T>(T value) 36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken) 46/// Takes an array of <see cref="IAsyncEnumerable{T}"/>s and produces a single resultant <see 47/// cref="IAsyncEnumerable{T}"/> with all their values merged together. Absolutely no ordering guarantee is 52/// cref="IAsyncEnumerable{T}"/>, but one final stream is desired as the result.</remarks> 53public static IAsyncEnumerable<T> MergeAsync<T>(this ImmutableArray<IAsyncEnumerable<T>> streams, CancellationToken cancellationToken) 74static async Task ProcessAsync(IAsyncEnumerable<T> stream, ChannelWriter<T> writer, CancellationToken cancellationToken) 81public static async IAsyncEnumerable<T> ReadAllAsync<T>( 106public static async IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IEnumerable<TSource> source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
84Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 107Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 119IAsyncEnumerable<TSource> source, 121Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 156IAsyncEnumerable<TSource> source, 177Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189IAsyncEnumerable<TSource> source, 191Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 222IAsyncEnumerable<TSource> source, 241IAsyncEnumerable<TSource> source, 265public static IAsyncEnumerable<TItem> RunAsync<TArgs>( 301/// but returns value as an <see cref="IAsyncEnumerable{TItem}"/>. Versus an <see cref="ImmutableArray{TItem}"/>. 305public static IAsyncEnumerable<TItem> RunParallelStreamAsync<TSource, TArgs>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.cs (2)
44IAsyncEnumerable<TSource> source, 56IAsyncEnumerable<TSource> source,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (9)
212/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 219public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 229/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 237public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 247/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 254public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 269/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 278private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 614IAsyncEnumerable<TSource> source, Func<object, Task> taskBody,
Microsoft.CodeAnalysis.CodeStyle (36)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (12)
19public static readonly IAsyncEnumerable<T> Empty = GetEmptyAsync(); 22private static async IAsyncEnumerable<T> GetEmptyAsync() 30internal static async IAsyncEnumerable<T> SingletonAsync<T>(T value) 36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken) 46/// Takes an array of <see cref="IAsyncEnumerable{T}"/>s and produces a single resultant <see 47/// cref="IAsyncEnumerable{T}"/> with all their values merged together. Absolutely no ordering guarantee is 52/// cref="IAsyncEnumerable{T}"/>, but one final stream is desired as the result.</remarks> 53public static IAsyncEnumerable<T> MergeAsync<T>(this ImmutableArray<IAsyncEnumerable<T>> streams, CancellationToken cancellationToken) 74static async Task ProcessAsync(IAsyncEnumerable<T> stream, ChannelWriter<T> writer, CancellationToken cancellationToken) 81public static async IAsyncEnumerable<T> ReadAllAsync<T>( 106public static async IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IEnumerable<TSource> source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
84Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 107Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 119IAsyncEnumerable<TSource> source, 121Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 156IAsyncEnumerable<TSource> source, 177Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189IAsyncEnumerable<TSource> source, 191Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 222IAsyncEnumerable<TSource> source, 241IAsyncEnumerable<TSource> source, 265public static IAsyncEnumerable<TItem> RunAsync<TArgs>( 301/// but returns value as an <see cref="IAsyncEnumerable{TItem}"/>. Versus an <see cref="ImmutableArray{TItem}"/>. 305public static IAsyncEnumerable<TItem> RunParallelStreamAsync<TSource, TArgs>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.cs (2)
44IAsyncEnumerable<TSource> source, 56IAsyncEnumerable<TSource> source,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (9)
212/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 219public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 229/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 237public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 247/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 254public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 269/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 278private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 614IAsyncEnumerable<TSource> source, Func<object, Task> taskBody,
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceCodeFixProvider.cs (1)
125private static async IAsyncEnumerable<ImplementInterfaceConfiguration> GetImplementOptionsAsync(
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
134? MakeGenericType(nameof(IAsyncEnumerable<int>), methodSymbol.ReturnType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1258: this.Compilation.GetTypeByMetadataName(typeof(IAsyncEnumerable<>).FullName);
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
134? MakeGenericType(nameof(IAsyncEnumerable<int>), methodSymbol.ReturnType)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1258: this.Compilation.GetTypeByMetadataName(typeof(IAsyncEnumerable<>).FullName);
Microsoft.CodeAnalysis.EditorFeatures (3)
FindUsages\BufferedFindUsagesContext.cs (1)
206async ValueTask IFindUsagesContext.OnReferencesFoundAsync(IAsyncEnumerable<SourceReferenceItem> references, CancellationToken cancellationToken)
Peek\PeekableItemSource.cs (1)
119private static async IAsyncEnumerable<IPeekableItem> GetPeekableItemsForNavigableItemsAsync(
Suggestions\SuggestedActionsSource_Async.cs (1)
195private async IAsyncEnumerable<SuggestedActionSet> GetCodeFixesAndRefactoringsAsync(
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
FindUsages\FindUsagesTestContext.cs (1)
38public override async ValueTask OnReferencesFoundAsync(IAsyncEnumerable<SourceReferenceItem> references, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ExternalAccess.Copilot (2)
Completion\ICSharpCopilotContextProviderService.cs (1)
12IAsyncEnumerable<IContextItem> GetContextItemsAsync(Document document, int position, IReadOnlyDictionary<string, object> activeExperiments, CancellationToken cancellationToken);
Internal\Completion\CSharpContextProviderService.cs (1)
24public IAsyncEnumerable<IContextItem> GetContextItemsAsync(Document document, int position, IReadOnlyDictionary<string, object> activeExperiments, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Features (16)
AddImport\AbstractAddImportFeatureService.cs (1)
351IAsyncEnumerable<ImmutableArray<SymbolReference>> reader,
CodeFixes\Service\CodeFixService.cs (3)
173public async IAsyncEnumerable<CodeFixCollection> StreamFixesAsync( 446private async IAsyncEnumerable<CodeFixCollection> StreamFixesAsync( 709private async IAsyncEnumerable<CodeFixCollection> StreamConfigurationFixesAsync(
CodeFixes\Service\ICodeFixService.cs (2)
18IAsyncEnumerable<CodeFixCollection> StreamFixesAsync(TextDocument document, TextSpan textSpan, ICodeActionRequestPriorityProvider priorityProvider, CancellationToken cancellationToken); 35public static IAsyncEnumerable<CodeFixCollection> StreamFixesAsync(this ICodeFixService service, TextDocument document, TextSpan range, CancellationToken cancellationToken)
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
96var changes = ProducerConsumer<TextChange>.RunParallelStreamAsync(
EditAndContinue\EditSession.cs (2)
176private static async IAsyncEnumerable<Location> CreateChangedLocationsAsync(Project oldProject, Project newProject, ImmutableArray<DocumentAnalysisResults> documentAnalyses, [EnumeratorCancellation] CancellationToken cancellationToken) 506internal static async IAsyncEnumerable<DocumentId> GetChangedDocumentsAsync(TraceLog log, Project oldProject, Project newProject, [EnumeratorCancellation] CancellationToken cancellationToken)
ExternalAccess\UnitTesting\API\UnitTestingSearchHelpers.cs (2)
165private static IAsyncEnumerable<UnitTestingDocumentSpan> GetSourceLocationsInProcessWorkerAsync( 178private static async IAsyncEnumerable<UnitTestingDocumentSpan> GetSourceLocationsInProcessAsync(
FindUsages\AbstractFindUsagesService.DefinitionTrackingContext.cs (1)
42public ValueTask OnReferencesFoundAsync(IAsyncEnumerable<SourceReferenceItem> references, CancellationToken cancellationToken)
FindUsages\FindUsagesContext.cs (1)
32public virtual ValueTask OnReferencesFoundAsync(IAsyncEnumerable<SourceReferenceItem> references, CancellationToken cancellationToken) => default;
FindUsages\IFindUsagesContext.cs (1)
38ValueTask OnReferencesFoundAsync(IAsyncEnumerable<SourceReferenceItem> references, CancellationToken cancellationToken);
FindUsages\IRemoteFindUsagesService.cs (1)
143async IAsyncEnumerable<SourceReferenceItem> ConvertAsync(
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceCodeFixProvider.cs (1)
125private static async IAsyncEnumerable<ImplementInterfaceConfiguration> GetImplementOptionsAsync(
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\FindUsages\SimpleFindUsagesContext.cs (1)
69public override async ValueTask OnReferencesFoundAsync(IAsyncEnumerable<SourceReferenceItem> references, CancellationToken cancellationToken)
Handler\References\FindUsagesLSPContext.cs (1)
137public override async ValueTask OnReferencesFoundAsync(IAsyncEnumerable<SourceReferenceItem> references, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (36)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (12)
19public static readonly IAsyncEnumerable<T> Empty = GetEmptyAsync(); 22private static async IAsyncEnumerable<T> GetEmptyAsync() 30internal static async IAsyncEnumerable<T> SingletonAsync<T>(T value) 36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken) 46/// Takes an array of <see cref="IAsyncEnumerable{T}"/>s and produces a single resultant <see 47/// cref="IAsyncEnumerable{T}"/> with all their values merged together. Absolutely no ordering guarantee is 52/// cref="IAsyncEnumerable{T}"/>, but one final stream is desired as the result.</remarks> 53public static IAsyncEnumerable<T> MergeAsync<T>(this ImmutableArray<IAsyncEnumerable<T>> streams, CancellationToken cancellationToken) 74static async Task ProcessAsync(IAsyncEnumerable<T> stream, ChannelWriter<T> writer, CancellationToken cancellationToken) 81public static async IAsyncEnumerable<T> ReadAllAsync<T>( 106public static async IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IEnumerable<TSource> source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
84Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 107Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 119IAsyncEnumerable<TSource> source, 121Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 156IAsyncEnumerable<TSource> source, 177Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189IAsyncEnumerable<TSource> source, 191Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 222IAsyncEnumerable<TSource> source, 241IAsyncEnumerable<TSource> source, 265public static IAsyncEnumerable<TItem> RunAsync<TArgs>( 301/// but returns value as an <see cref="IAsyncEnumerable{TItem}"/>. Versus an <see cref="ImmutableArray{TItem}"/>. 305public static IAsyncEnumerable<TItem> RunParallelStreamAsync<TSource, TArgs>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.cs (2)
44IAsyncEnumerable<TSource> source, 56IAsyncEnumerable<TSource> source,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (9)
212/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 219public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 229/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 237public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 247/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 254public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 269/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 278private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 614IAsyncEnumerable<TSource> source, Func<object, Task> taskBody,
Microsoft.CodeAnalysis.PublicApiAnalyzers (36)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (12)
19public static readonly IAsyncEnumerable<T> Empty = GetEmptyAsync(); 22private static async IAsyncEnumerable<T> GetEmptyAsync() 30internal static async IAsyncEnumerable<T> SingletonAsync<T>(T value) 36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken) 46/// Takes an array of <see cref="IAsyncEnumerable{T}"/>s and produces a single resultant <see 47/// cref="IAsyncEnumerable{T}"/> with all their values merged together. Absolutely no ordering guarantee is 52/// cref="IAsyncEnumerable{T}"/>, but one final stream is desired as the result.</remarks> 53public static IAsyncEnumerable<T> MergeAsync<T>(this ImmutableArray<IAsyncEnumerable<T>> streams, CancellationToken cancellationToken) 74static async Task ProcessAsync(IAsyncEnumerable<T> stream, ChannelWriter<T> writer, CancellationToken cancellationToken) 81public static async IAsyncEnumerable<T> ReadAllAsync<T>( 106public static async IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IEnumerable<TSource> source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
84Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 107Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 119IAsyncEnumerable<TSource> source, 121Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 156IAsyncEnumerable<TSource> source, 177Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189IAsyncEnumerable<TSource> source, 191Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 222IAsyncEnumerable<TSource> source, 241IAsyncEnumerable<TSource> source, 265public static IAsyncEnumerable<TItem> RunAsync<TArgs>( 301/// but returns value as an <see cref="IAsyncEnumerable{TItem}"/>. Versus an <see cref="ImmutableArray{TItem}"/>. 305public static IAsyncEnumerable<TItem> RunParallelStreamAsync<TSource, TArgs>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.cs (2)
44IAsyncEnumerable<TSource> source, 56IAsyncEnumerable<TSource> source,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (9)
212/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 219public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 229/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 237public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 247/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 254public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 269/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 278private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 614IAsyncEnumerable<TSource> source, Func<object, Task> taskBody,
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\FindUsages\RemoteFindUsagesService.cs (1)
131public async ValueTask OnReferencesFoundAsync(IAsyncEnumerable<SourceReferenceItem> references, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Remote.Workspaces (1)
RemoteHostAssetWriter.cs (1)
86IAsyncEnumerable<ChecksumAndAsset> checksumsAndAssets, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ResxSourceGenerator (36)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (12)
19public static readonly IAsyncEnumerable<T> Empty = GetEmptyAsync(); 22private static async IAsyncEnumerable<T> GetEmptyAsync() 30internal static async IAsyncEnumerable<T> SingletonAsync<T>(T value) 36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken) 46/// Takes an array of <see cref="IAsyncEnumerable{T}"/>s and produces a single resultant <see 47/// cref="IAsyncEnumerable{T}"/> with all their values merged together. Absolutely no ordering guarantee is 52/// cref="IAsyncEnumerable{T}"/>, but one final stream is desired as the result.</remarks> 53public static IAsyncEnumerable<T> MergeAsync<T>(this ImmutableArray<IAsyncEnumerable<T>> streams, CancellationToken cancellationToken) 74static async Task ProcessAsync(IAsyncEnumerable<T> stream, ChannelWriter<T> writer, CancellationToken cancellationToken) 81public static async IAsyncEnumerable<T> ReadAllAsync<T>( 106public static async IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IEnumerable<TSource> source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
84Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 107Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 119IAsyncEnumerable<TSource> source, 121Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 156IAsyncEnumerable<TSource> source, 177Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189IAsyncEnumerable<TSource> source, 191Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 222IAsyncEnumerable<TSource> source, 241IAsyncEnumerable<TSource> source, 265public static IAsyncEnumerable<TItem> RunAsync<TArgs>( 301/// but returns value as an <see cref="IAsyncEnumerable{TItem}"/>. Versus an <see cref="ImmutableArray{TItem}"/>. 305public static IAsyncEnumerable<TItem> RunParallelStreamAsync<TSource, TArgs>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.cs (2)
44IAsyncEnumerable<TSource> source, 56IAsyncEnumerable<TSource> source,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (9)
212/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 219public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 229/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 237public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 247/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 254public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 269/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 278private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 614IAsyncEnumerable<TSource> source, Func<object, Task> taskBody,
Microsoft.CodeAnalysis.Workspaces (41)
FindSymbols\FindLiterals\FindLiteralsSearchEngine.cs (2)
95static async IAsyncEnumerable<TResult> SelectManyAsync<TSource, TResult>(IEnumerable<TSource> source, Func<TSource, IAsyncEnumerable<TResult>> selector)
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (1)
125private async IAsyncEnumerable<(Project project, ImmutableArray<(ISymbol symbol, SymbolGroup group)> allSymbols)> GetProjectsAndSymbolsToSearchSeriallyAsync(
FindSymbols\FindReferences\FindReferencesSearchEngine_FindReferencesInDocuments.cs (1)
165FindReferencesSearchEngine @this, IAsyncEnumerable<FinderLocation> locations, ISymbol symbol, SymbolGroup group, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (12)
19public static readonly IAsyncEnumerable<T> Empty = GetEmptyAsync(); 22private static async IAsyncEnumerable<T> GetEmptyAsync() 30internal static async IAsyncEnumerable<T> SingletonAsync<T>(T value) 36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken) 46/// Takes an array of <see cref="IAsyncEnumerable{T}"/>s and produces a single resultant <see 47/// cref="IAsyncEnumerable{T}"/> with all their values merged together. Absolutely no ordering guarantee is 52/// cref="IAsyncEnumerable{T}"/>, but one final stream is desired as the result.</remarks> 53public static IAsyncEnumerable<T> MergeAsync<T>(this ImmutableArray<IAsyncEnumerable<T>> streams, CancellationToken cancellationToken) 74static async Task ProcessAsync(IAsyncEnumerable<T> stream, ChannelWriter<T> writer, CancellationToken cancellationToken) 81public static async IAsyncEnumerable<T> ReadAllAsync<T>( 106public static async IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IEnumerable<TSource> source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
84Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 107Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 119IAsyncEnumerable<TSource> source, 121Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 156IAsyncEnumerable<TSource> source, 177Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189IAsyncEnumerable<TSource> source, 191Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 222IAsyncEnumerable<TSource> source, 241IAsyncEnumerable<TSource> source, 265public static IAsyncEnumerable<TItem> RunAsync<TArgs>( 301/// but returns value as an <see cref="IAsyncEnumerable{TItem}"/>. Versus an <see cref="ImmutableArray{TItem}"/>. 305public static IAsyncEnumerable<TItem> RunParallelStreamAsync<TSource, TArgs>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.cs (2)
44IAsyncEnumerable<TSource> source, 56IAsyncEnumerable<TSource> source,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (9)
212/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 219public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 229/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 237public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 247/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 254public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 269/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 278private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 614IAsyncEnumerable<TSource> source, Func<object, Task> taskBody,
Workspace\Solution\Project.cs (1)
325internal async IAsyncEnumerable<Document> GetAllRegularAndSourceGeneratedDocumentsAsync([EnumeratorCancellation] CancellationToken cancellationToken)
Microsoft.DotNet.Helix.Client (5)
generated-code\PagedResponse.cs (5)
15public static async Task<List<T>> ToListAsync<T>(this IAsyncEnumerable<T> that, CancellationToken cancellationToken) 29public static AsyncPageable<T> Create<T>(Func<string, int?, IAsyncEnumerable<Page<T>>> pageFunc) 36private readonly Func<string, int?, IAsyncEnumerable<Page<T>>> _pageFunc; 38public FuncAsyncPageable(Func<string, int?, IAsyncEnumerable<Page<T>>> pageFunc) 43public override IAsyncEnumerable<Page<T>> AsPages(string continuationToken = null, int? pageSizeHint = null)
Microsoft.DotNet.XUnitAssert.Tests (94)
AsyncCollectionAssertsTests.cs (93)
21 Assert.Throws<ArgumentNullException>("collection", () => Assert.All(default(IAsyncEnumerable<object>)!, _ => { })); 29 var items = new[] { 1, 1, 1, 1, 1, 1 }.ToAsyncEnumerable(); 37 var items = new[] { 1, 1, 42, 2112, 1, 1 }.ToAsyncEnumerable(); 73 await Assert.ThrowsAsync<ArgumentNullException>("collection", () => Assert.AllAsync(default(IAsyncEnumerable<object>)!, async _ => await Task.Yield())); 81 var items = new[] { 1, 1, 1, 1, 1, 1 }.ToAsyncEnumerable(); 89 var items = new[] { 1, 1, 42, 2112, 1, 1 }.ToAsyncEnumerable(); 111 var items = new[] { 1, 1, 2, 2, 1, 1 }.ToAsyncEnumerable(); 125 var list = new List<int>().ToAsyncEnumerable(); 135 var list = new List<int>().ToAsyncEnumerable(); 157 var list = new List<int> { 42, 2112 }.ToAsyncEnumerable(); 168 var list = new List<int> { 42, 2112 }.ToAsyncEnumerable(); 196 var list = new List<int>().ToAsyncEnumerable(); 206 var list = new List<int>().ToAsyncEnumerable(); 228 var list = new List<int> { 42, 2112 }.ToAsyncEnumerable(); 247 var list = new List<int> { 42, 2112 }.ToAsyncEnumerable(); 283 Assert.Throws<ArgumentNullException>("collection", () => Assert.Contains(14, default(IAsyncEnumerable<int>)!)); 289 var list = new List<object?> { 16, null, "Hi there" }.ToAsyncEnumerable(); 297 var list = new List<int> { 42 }.ToAsyncEnumerable(); 305 var list = new List<int> { 41, 43 }.ToAsyncEnumerable(); 321 var list = new List<object?> { null, 16, "Hi there" }.ToAsyncEnumerable(); 334 Assert.Throws<ArgumentNullException>("collection", () => Assert.Contains(14, default(IAsyncEnumerable<int>)!, comparer)); 341 var list = new List<int> { 42 }.ToAsyncEnumerable(); 359 Assert.Throws<ArgumentNullException>("collection", () => Assert.Contains(default(IAsyncEnumerable<int>)!, item => true)); 366 var list = new[] { "Hello", "world" }.ToAsyncEnumerable(); 374 var list = new[] { "Hello", "world" }.ToAsyncEnumerable(); 392 Assert.Throws<ArgumentNullException>("collection", () => Assert.Distinct(default(IAsyncEnumerable<int>)!)); 399 var list = new List<object?> { 16, "Hi there", null }.ToAsyncEnumerable(); 407 var list = new List<int> { 42, 42 }.ToAsyncEnumerable(); 423 var list = new List<string?> { "a", null, "b", null, "c", "d" }.ToAsyncEnumerable(); 439 var list = new string[] { "a", "b", "A" }.ToAsyncEnumerable(); 448 var list = new string[] { "a", "b", "A" }.ToAsyncEnumerable(); 467 Assert.Throws<ArgumentNullException>("collection", () => Assert.DoesNotContain(14, default(IAsyncEnumerable<int>)!)); 473 var list = new List<object?> { 16, "Hi there" }.ToAsyncEnumerable(); 481 var list = new List<int> { 42 }.ToAsyncEnumerable(); 498 var list = new List<int>().ToAsyncEnumerable(); 506 var list = new List<object?> { null, 16, "Hi there" }.ToAsyncEnumerable(); 519 Assert.Throws<ArgumentNullException>("collection", () => Assert.DoesNotContain(14, default(IAsyncEnumerable<int>)!, comparer)); 526 var list = new List<int> { 42 }.ToAsyncEnumerable(); 544 Assert.Throws<ArgumentNullException>("collection", () => Assert.DoesNotContain(default(IAsyncEnumerable<int>)!, item => true)); 551 var list = new[] { "Hello", "world" }.ToAsyncEnumerable(); 567 var list = new[] { "Hello", "world" }.ToAsyncEnumerable(); 578 Assert.Throws<ArgumentNullException>("collection", () => Assert.Empty(default(IAsyncEnumerable<int>)!)); 584 var list = new List<int>().ToAsyncEnumerable(); 592 var list = new List<int> { 42 }.ToAsyncEnumerable(); 623 var nullAsyncEnumerable = default(IAsyncEnumerable<int>); 633 var actual = default(IAsyncEnumerable<int>); 657 var actual = new int[0].ToAsyncEnumerable(); 673 validateError(() => Assert.Equal(default(IAsyncEnumerable<int>), actual)); 683 var actual = expected.ToAsyncEnumerable(); 739 var actual = actualArray is null ? null : new List<int>(actualArray).ToAsyncEnumerable(); 784 var actual = expected.ToAsyncEnumerable(); 813 var actual = new int[] { 0, 0, 0, 0, 0 }.ToAsyncEnumerable(); 907 var actual = new[] { new EquatableObject { Char = 'a' } }.ToAsyncEnumerable(); 917 var actual = new[] { new EquatableObject { Char = 'b' } }.ToAsyncEnumerable(); 957 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 }).ToAsyncEnumerable(); 986 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 }).ToAsyncEnumerable(); 997 var actual = new List<EnumerableItem> { new(0), new(2) }.ToAsyncEnumerable(); 1018 var actual = new[] { 1, 3 }.ToAsyncEnumerable(); 1051 var list = new List<int>().ToAsyncEnumerable(); 1065 var list = new List<int> { 42 }.ToAsyncEnumerable(); 1089 var nullAsyncEnumerable = default(IAsyncEnumerable<int>); 1111 var actual = default(IAsyncEnumerable<int>); 1120 var actual = new int[0].ToAsyncEnumerable(); 1123 Assert.NotEqual(default(IAsyncEnumerable<int>), actual); 1133 var actual = new List<int>(expected).ToAsyncEnumerable(); 1160 var actual = new List<int>(new[] { 1, 2, 3, 4, 0, 6, 7, 8, 9, 10 }).ToAsyncEnumerable(); 1173 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 }).ToAsyncEnumerable(); 1183 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 }).ToAsyncEnumerable(); 1224 var actual = new[] { 1, 2 }.ToAsyncEnumerable(); 1266 var actual = new[] { new EquatableObject { Char = 'a' } }.ToAsyncEnumerable(); 1293 var actual = new[] { new EquatableObject { Char = 'b' } }.ToAsyncEnumerable(); 1314 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 }).ToAsyncEnumerable(); 1324 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 }).ToAsyncEnumerable(); 1351 var actual = new[] { 1, 2 }.ToAsyncEnumerable(); 1384 Assert.Throws<ArgumentNullException>("collection", () => Assert.Single(default(IAsyncEnumerable<object>)!)); 1390 var collection = new object[0].ToAsyncEnumerable(); 1401 var collection = new[] { "Hello" }.ToAsyncEnumerable(); 1411 var collection = new[] { "Hello", "World" }.ToAsyncEnumerable(); 1426 var collection = new[] { 1, 2, 3, 4, 5, 6, 7 }.ToAsyncEnumerable(); 1441 var collection = "H".ToAsyncEnumerable(); 1451 var collection = "Hello".ToAsyncEnumerable(); 1469 Assert.Throws<ArgumentNullException>("collection", () => Assert.Single(default(IAsyncEnumerable<object>)!, _ => true)); 1476 var collection = new[] { "Hello", "World" }.ToAsyncEnumerable(); 1486 var collection = new[] { "Hello", "World" }.ToAsyncEnumerable(); 1502 var collection = new[] { "Hello", "World" }.ToAsyncEnumerable(); 1519 var collection = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 4 }.ToAsyncEnumerable(); 1536 var collection = "H".ToAsyncEnumerable(); 1546 var collection = "H".ToAsyncEnumerable(); 1564 public SpyEnumerator(IAsyncEnumerable<T> enumerable)
EnumerableExtensions.cs (1)
6 public async static IAsyncEnumerable<T> ToAsyncEnumerable<T>(this IEnumerable<T> data)
Microsoft.Extensions.AI (15)
ChatCompletion\AnonymousDelegatingChatClient.cs (5)
31private readonly Func<IEnumerable<ChatMessage>, ChatOptions?, IChatClient, CancellationToken, IAsyncEnumerable<ChatResponseUpdate>>? _getStreamingResponseFunc; 80Func<IEnumerable<ChatMessage>, ChatOptions?, IChatClient, CancellationToken, IAsyncEnumerable<ChatResponseUpdate>>? getStreamingResponseFunc) 129public override IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync( 167static async IAsyncEnumerable<ChatResponseUpdate> ReadAllAsync( 189static async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsyncViaGetResponseAsync(Task<ChatResponse> task)
ChatCompletion\CachingChatClient.cs (2)
77public override IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync( 87private async IAsyncEnumerable<ChatResponseUpdate> GetCachedStreamingResponseAsync(
ChatCompletion\ChatClientBuilder.cs (1)
144Func<IEnumerable<ChatMessage>, ChatOptions?, IChatClient, CancellationToken, IAsyncEnumerable<ChatResponseUpdate>>? getStreamingResponseFunc)
ChatCompletion\ConfigureOptionsChatClient.cs (1)
42public override async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
ChatCompletion\FunctionInvokingChatClient.cs (1)
313public override async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
ChatCompletion\LoggingChatClient.cs (1)
100public override async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
ChatCompletion\OpenTelemetryChatClient.cs (2)
163public override async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync( 175IAsyncEnumerable<ChatResponseUpdate> updates;
SpeechToText\ConfigureOptionsSpeechToTextClient.cs (1)
47public override async IAsyncEnumerable<SpeechToTextResponseUpdate> GetStreamingTextAsync(
SpeechToText\LoggingSpeechToTextClient.cs (1)
103public override async IAsyncEnumerable<SpeechToTextResponseUpdate> GetStreamingTextAsync(
Microsoft.Extensions.AI.Abstractions (15)
ChatCompletion\ChatClientExtensions.cs (2)
131public static IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync( 151public static IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
ChatCompletion\ChatResponseExtensions.cs (4)
110this IList<ChatMessage> list, IAsyncEnumerable<ChatResponseUpdate> updates, CancellationToken cancellationToken = default) 118IList<ChatMessage> list, IAsyncEnumerable<ChatResponseUpdate> updates, CancellationToken cancellationToken) => 161this IAsyncEnumerable<ChatResponseUpdate> updates, CancellationToken cancellationToken = default) 168IAsyncEnumerable<ChatResponseUpdate> updates, CancellationToken cancellationToken)
ChatCompletion\ChatResponseUpdate.cs (1)
112/// This value is used when <see cref="ChatResponseExtensions.ToChatResponseAsync(IAsyncEnumerable{ChatResponseUpdate}, System.Threading.CancellationToken)"/>
ChatCompletion\DelegatingChatClient.cs (1)
47public virtual IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
ChatCompletion\IChatClient.cs (1)
54IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
Functions\AIFunctionFactory.cs (1)
744if (t == typeof(Task<>) || t == typeof(ValueTask<>) || t == typeof(IAsyncEnumerable<>))
SpeechToText\DelegatingSpeechToTextClient.cs (1)
51public virtual IAsyncEnumerable<SpeechToTextResponseUpdate> GetStreamingTextAsync(
SpeechToText\ISpeechToTextClient.cs (1)
46IAsyncEnumerable<SpeechToTextResponseUpdate> GetStreamingTextAsync(
SpeechToText\SpeechToTextClientExtensions.cs (1)
62public static IAsyncEnumerable<SpeechToTextResponseUpdate> GetStreamingTextAsync(
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (2)
45this IAsyncEnumerable<SpeechToTextResponseUpdate> updates, CancellationToken cancellationToken = default) 52IAsyncEnumerable<SpeechToTextResponseUpdate> updates, CancellationToken cancellationToken)
Microsoft.Extensions.AI.Abstractions.Tests (13)
ChatCompletion\ChatClientExtensionsTests.cs (1)
161private static async IAsyncEnumerable<ChatResponseUpdate> YieldAsync(params ChatResponseUpdate[] updates)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (1)
206private static async IAsyncEnumerable<ChatResponseUpdate> YieldAsync(IEnumerable<ChatResponseUpdate> updates)
ChatCompletion\DelegatingChatClientTests.cs (2)
79var resultAsyncEnumerable = delegating.GetStreamingResponseAsync(expectedChatContents, expectedChatOptions, expectedCancellationToken); 154private static async IAsyncEnumerable<T> YieldAsync<T>(IEnumerable<T> input)
SpeechToText\DelegatingSpeechToTextClientTests.cs (2)
80var resultAsyncEnumerable = delegating.GetStreamingTextAsync(expectedAudioSpeechStream, expectedOptions, expectedCancellationToken); 155private static async IAsyncEnumerable<T> YieldAsync<T>(IEnumerable<T> input)
SpeechToText\SpeechToTextClientExtensionsTests.cs (1)
85private static async IAsyncEnumerable<SpeechToTextResponseUpdate> YieldAsync(params SpeechToTextResponseUpdate[] updates)
SpeechToText\SpeechToTextClientTests.cs (1)
78private static async IAsyncEnumerable<SpeechToTextResponseUpdate> GetStreamingUpdatesAsync()
SpeechToText\SpeechToTextResponseUpdateExtensionsTests.cs (1)
156private static async IAsyncEnumerable<SpeechToTextResponseUpdate> YieldAsync(IEnumerable<SpeechToTextResponseUpdate> updates)
TestChatClient.cs (2)
22public Func<IEnumerable<ChatMessage>, ChatOptions?, CancellationToken, IAsyncEnumerable<ChatResponseUpdate>>? GetStreamingResponseAsyncCallback { get; set; } 32public IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
TestSpeechToTextClient.cs (2)
32IAsyncEnumerable<SpeechToTextResponseUpdate>>? 47public IAsyncEnumerable<SpeechToTextResponseUpdate> GetStreamingTextAsync(
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
140public async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
Microsoft.Extensions.AI.Evaluation (7)
CompositeEvaluator.cs (2)
111IAsyncEnumerable<EvaluationResult> resultsStream = 127private IAsyncEnumerable<EvaluationResult> EvaluateAndStreamResultsAsync(
Utilities\TaskExtensions.cs (5)
15internal static IAsyncEnumerable<T> ExecuteConcurrentlyAndStreamResultsAsync<T>( 24internal static IAsyncEnumerable<T> ExecuteConcurrentlyAndStreamResultsAsync<T>( 42internal static async IAsyncEnumerable<T> StreamResultsAsync<T>( 79internal static async IAsyncEnumerable<T> StreamResultsAsync<T>( 95IAsyncEnumerable<T> results =
Microsoft.Extensions.AI.Evaluation.Reporting (9)
IEvaluationResultStore.cs (4)
40IAsyncEnumerable<ScenarioRunResult> ReadResultsAsync( 95IAsyncEnumerable<string> GetLatestExecutionNamesAsync( 109IAsyncEnumerable<string> GetScenarioNamesAsync( 124IAsyncEnumerable<string> GetIterationNamesAsync(
SimpleChatClient.cs (1)
51public override async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
Storage\DiskBasedResultStore.cs (4)
53public async IAsyncEnumerable<ScenarioRunResult> ReadResultsAsync( 181public async IAsyncEnumerable<string> GetLatestExecutionNamesAsync( 208public async IAsyncEnumerable<string> GetScenarioNamesAsync( 228public async IAsyncEnumerable<string> GetIterationNamesAsync(
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (4)
Storage\AzureStorageResultStore.cs (4)
37public async IAsyncEnumerable<string> GetLatestExecutionNamesAsync( 58public async IAsyncEnumerable<string> GetScenarioNamesAsync( 75public async IAsyncEnumerable<string> GetIterationNamesAsync( 93public async IAsyncEnumerable<ScenarioRunResult> ReadResultsAsync(
Microsoft.Extensions.AI.Evaluation.Safety (1)
ContentSafetyChatClient.cs (1)
94public async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
Microsoft.Extensions.AI.Integration.Tests (10)
CallCountingChatClient.cs (1)
26public override IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
ChatClientIntegrationTests.cs (3)
134var response = _chatClient.GetStreamingResponseAsync("Explain in 10 words how AI works", new() 163var streamingResponse = _chatClient.GetStreamingResponseAsync(history); 266var response = chatClient.GetStreamingResponseAsync("What is the result of SecretComputation on 42 and 84?", new()
PromptBasedFunctionCallingChatClient.cs (1)
137public override async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
ReducingChatClientTests.cs (1)
84public override async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (2)
22public Func<IEnumerable<ChatMessage>, ChatOptions?, CancellationToken, IAsyncEnumerable<ChatResponseUpdate>>? GetStreamingResponseAsyncCallback { get; set; } 32public IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestSpeechToTextClient.cs (2)
32IAsyncEnumerable<SpeechToTextResponseUpdate>>? 47public IAsyncEnumerable<SpeechToTextResponseUpdate> GetStreamingTextAsync(
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
126public async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
Microsoft.Extensions.AI.Ollama.Tests (1)
OllamaChatClientTests.cs (1)
175var streamingResponse = client.GetStreamingResponseAsync("hello", new()
Microsoft.Extensions.AI.OpenAI (11)
OpenAIAssistantChatClient.cs (2)
80public async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync( 116IAsyncEnumerable<StreamingUpdate> updates;
OpenAIChatClient.cs (3)
83public IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync( 291private static async IAsyncEnumerable<ChatResponseUpdate> FromOpenAIStreamingChatCompletionAsync( 292IAsyncEnumerable<StreamingChatCompletionUpdate> updates,
OpenAIResponseChatClient.cs (1)
157public async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
OpenAISpeechToTextClient.cs (1)
123public async IAsyncEnumerable<SpeechToTextResponseUpdate> GetStreamingTextAsync(
src\Shared\ServerSentEvents\SseFormatter.cs (3)
30public static Task WriteAsync(IAsyncEnumerable<SseItem<string>> source, Stream destination, CancellationToken cancellationToken = default) 54public static Task WriteAsync<T>(IAsyncEnumerable<SseItem<T>> source, Stream destination, Action<SseItem<T>, IBufferWriter<byte>> itemFormatter, CancellationToken cancellationToken = default) 74private static async Task WriteAsyncCore<T>(IAsyncEnumerable<SseItem<T>> source, Stream destination, Action<SseItem<T>, IBufferWriter<byte>> itemFormatter, CancellationToken cancellationToken)
src\Shared\ServerSentEvents\SseParser_1.cs (1)
192public async IAsyncEnumerable<SseItem<T>> EnumerateAsync([EnumeratorCancellation] CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.Tests (33)
ChatCompletion\ConfigureOptionsChatClientTests.cs (1)
89static async IAsyncEnumerable<ChatResponseUpdate> YieldUpdates(ChatResponseUpdate[] updates)
ChatCompletion\DistributedCachingChatClientTest.cs (17)
288var result1 = outer.GetStreamingResponseAsync("some input", options); 293var result2 = outer.GetStreamingResponseAsync("some input", options); 335var result1 = outer.GetStreamingResponseAsync("some input"); 339var result2 = outer.GetStreamingResponseAsync("some input"); 408var result1 = outer.GetStreamingResponseAsync("some input"); 412var result2 = outer.GetStreamingResponseAsync("some input"); 452var result1 = outer.GetStreamingResponseAsync("some input"); 453var result2 = outer.GetStreamingResponseAsync("some input"); 467var result3 = outer.GetStreamingResponseAsync("some input"); 495var result1 = outer.GetStreamingResponseAsync([input]); 501var result2 = outer.GetStreamingResponseAsync([input]); 533var result1 = outer.GetStreamingResponseAsync([input]); 764private static async Task<List<T>> ToListAsync<T>(IAsyncEnumerable<T> values) 775private static IAsyncEnumerable<T> ToAsyncEnumerableAsync<T>(IEnumerable<T> values) 778private static IAsyncEnumerable<T> ToAsyncEnumerableAsync<T>(Task preTask, IEnumerable<T> valueFactories) 781private static async IAsyncEnumerable<T> ToAsyncEnumerableAsync<T>(Task preTask, IEnumerable<Func<T>> values) 833private static async Task AssertResponsesEqualAsync(IReadOnlyList<ChatResponseUpdate> expected, IAsyncEnumerable<ChatResponseUpdate> actual)
ChatCompletion\FunctionInvokingChatClientTests.cs (1)
1175private static async IAsyncEnumerable<T> YieldAsync<T>(params IEnumerable<T> items)
ChatCompletion\LoggingChatClientTests.cs (1)
105static async IAsyncEnumerable<ChatResponseUpdate> GetUpdatesAsync()
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
64async static IAsyncEnumerable<ChatResponseUpdate> CallbackAsync(
ChatCompletion\UseDelegateChatClientTests.cs (3)
146static async IAsyncEnumerable<ChatResponseUpdate> Impl( 217static async IAsyncEnumerable<ChatResponseUpdate> Impl( 239private static async IAsyncEnumerable<ChatResponseUpdate> YieldUpdates(params ChatResponseUpdate[] updates)
Functions\AIFunctionFactoryTest.cs (3)
190static async IAsyncEnumerable<int> SimpleIAsyncEnumerable(int count) 199func = AIFunctionFactory.Create(() => (IAsyncEnumerable<int>)new ThrowingAsyncEnumerable(), serializerOptions: JsonContext.Default.Options); 940[JsonSerializable(typeof(IAsyncEnumerable<int>))]
SpeechToText\ConfigureOptionsSpeechToTextClientTests.cs (1)
92static async IAsyncEnumerable<SpeechToTextResponseUpdate> YieldUpdates(SpeechToTextResponseUpdate[] updates)
SpeechToText\LoggingSpeechToTextClientTests.cs (1)
108static async IAsyncEnumerable<SpeechToTextResponseUpdate> GetUpdatesAsync()
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (2)
22public Func<IEnumerable<ChatMessage>, ChatOptions?, CancellationToken, IAsyncEnumerable<ChatResponseUpdate>>? GetStreamingResponseAsyncCallback { get; set; } 32public IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestSpeechToTextClient.cs (2)
32IAsyncEnumerable<SpeechToTextResponseUpdate>>? 47public IAsyncEnumerable<SpeechToTextResponseUpdate> GetStreamingTextAsync(
Microsoft.ML.GenAI.Core (2)
CausalLMPipelineChatClient.cs (1)
57public virtual async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
Trainer\CasualLMSupervisedFineTuningTrainer.cs (1)
28public async IAsyncEnumerable<ICausalLMPipeline> TrainAsync(
Microsoft.ML.GenAI.LLaMA (4)
Llama3CausalLMChatClient.cs (1)
46public override IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
LlamaCausalLMAgent.cs (1)
63public async IAsyncEnumerable<IMessage> GenerateStreamingReplyAsync(
LlamaChatCompletionService.cs (1)
41public async IAsyncEnumerable<StreamingChatMessageContent> GetStreamingChatMessageContentsAsync(
LlamaTextCompletionService.cs (1)
36public async IAsyncEnumerable<StreamingTextContent> GetStreamingTextContentsAsync(
Microsoft.ML.GenAI.Mistral (1)
MistralCausalLMAgent.cs (1)
73public async IAsyncEnumerable<IMessage> GenerateStreamingReplyAsync(
Microsoft.ML.GenAI.Phi (4)
Phi3\Phi3CausalLMAgent.cs (1)
62public async IAsyncEnumerable<IMessage> GenerateStreamingReplyAsync(
Phi3\Phi3CausalLMChatClient.cs (1)
51public override IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
Phi3\Phi3CausalLMChatCompletionService.cs (1)
43public async IAsyncEnumerable<StreamingChatMessageContent> GetStreamingChatMessageContentsAsync(
Phi3\Phi3CausalLMTextGenerationService.cs (1)
49public async IAsyncEnumerable<StreamingTextContent> GetStreamingTextContentsAsync(
Microsoft.VisualStudio.LanguageServices (1)
FindReferences\Contexts\AbstractTableDataSourceFindUsagesContext.cs (1)
506public sealed override async ValueTask OnReferencesFoundAsync(IAsyncEnumerable<SourceReferenceItem> references, CancellationToken cancellationToken)
mscorlib (1)
mscorlib.cs (1)
54[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IAsyncEnumerable<>))]
netstandard (1)
netstandard.cs (1)
110[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IAsyncEnumerable<>))]
Replay (1)
Replay.cs (1)
140static async IAsyncEnumerable<BuildData> BuildAllAsync(
Roslyn.Diagnostics.Analyzers (36)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (12)
19public static readonly IAsyncEnumerable<T> Empty = GetEmptyAsync(); 22private static async IAsyncEnumerable<T> GetEmptyAsync() 30internal static async IAsyncEnumerable<T> SingletonAsync<T>(T value) 36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken) 46/// Takes an array of <see cref="IAsyncEnumerable{T}"/>s and produces a single resultant <see 47/// cref="IAsyncEnumerable{T}"/> with all their values merged together. Absolutely no ordering guarantee is 52/// cref="IAsyncEnumerable{T}"/>, but one final stream is desired as the result.</remarks> 53public static IAsyncEnumerable<T> MergeAsync<T>(this ImmutableArray<IAsyncEnumerable<T>> streams, CancellationToken cancellationToken) 74static async Task ProcessAsync(IAsyncEnumerable<T> stream, ChannelWriter<T> writer, CancellationToken cancellationToken) 81public static async IAsyncEnumerable<T> ReadAllAsync<T>( 106public static async IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IEnumerable<TSource> source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
84Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 107Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 119IAsyncEnumerable<TSource> source, 121Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 156IAsyncEnumerable<TSource> source, 177Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189IAsyncEnumerable<TSource> source, 191Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 222IAsyncEnumerable<TSource> source, 241IAsyncEnumerable<TSource> source, 265public static IAsyncEnumerable<TItem> RunAsync<TArgs>( 301/// but returns value as an <see cref="IAsyncEnumerable{TItem}"/>. Versus an <see cref="ImmutableArray{TItem}"/>. 305public static IAsyncEnumerable<TItem> RunParallelStreamAsync<TSource, TArgs>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.cs (2)
44IAsyncEnumerable<TSource> source, 56IAsyncEnumerable<TSource> source,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (9)
212/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 219public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 229/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 237public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 247/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 254public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 269/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 278private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 614IAsyncEnumerable<TSource> source, Func<object, Task> taskBody,
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1258: this.Compilation.GetTypeByMetadataName(typeof(IAsyncEnumerable<>).FullName);
Shared (4)
ServerSentEvents\SseFormatter.cs (3)
30public static Task WriteAsync(IAsyncEnumerable<SseItem<string>> source, Stream destination, CancellationToken cancellationToken = default) 54public static Task WriteAsync<T>(IAsyncEnumerable<SseItem<T>> source, Stream destination, Action<SseItem<T>, IBufferWriter<byte>> itemFormatter, CancellationToken cancellationToken = default) 74private static async Task WriteAsyncCore<T>(IAsyncEnumerable<SseItem<T>> source, Stream destination, Action<SseItem<T>, IBufferWriter<byte>> itemFormatter, CancellationToken cancellationToken)
ServerSentEvents\SseParser_1.cs (1)
192public async IAsyncEnumerable<SseItem<T>> EnumerateAsync([EnumeratorCancellation] CancellationToken cancellationToken = default)
SignalRSamples (1)
Hubs\Streaming.cs (1)
12public async IAsyncEnumerable<int> AsyncEnumerableCounter(int count, double delay)
Stress.ApiService (1)
Program.cs (1)
200async IAsyncEnumerable<string> WriteOutput()
System.Linq.AsyncEnumerable (773)
System\Linq\AggregateAsync.cs (16)
15/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to aggregate over.</param> 23this IAsyncEnumerable<TSource> source, 33IAsyncEnumerable<TSource> source, 56/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to aggregate over.</param> 64this IAsyncEnumerable<TSource> source, 74IAsyncEnumerable<TSource> source, 98/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to aggregate over.</param> 106this IAsyncEnumerable<TSource> source, 135/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to aggregate over.</param> 143this IAsyncEnumerable<TSource> source, TAccumulate seed, 153IAsyncEnumerable<TSource> source, TAccumulate seed, 176/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to aggregate over.</param> 186this IAsyncEnumerable<TSource> source, 223/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to aggregate over.</param> 233this IAsyncEnumerable<TSource> source, 246IAsyncEnumerable<TSource> source,
System\Linq\AggregateBy.cs (20)
20/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to aggregate over.</param> 33public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>( 34this IAsyncEnumerable<TSource> source, 49static async IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> Impl( 50IAsyncEnumerable<TSource> source, 91/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to aggregate over.</param> 104public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>( 105this IAsyncEnumerable<TSource> source, 120static async IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> Impl( 121IAsyncEnumerable<TSource> source, 157/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to aggregate over.</param> 171public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>( 172this IAsyncEnumerable<TSource> source, 187static async IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> Impl( 188IAsyncEnumerable<TSource> source, 229/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to aggregate over.</param> 243public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>( 244this IAsyncEnumerable<TSource> source, 259static async IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> Impl( 260IAsyncEnumerable<TSource> source,
System\Linq\AllAsync.cs (5)
15/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> that contains the elements to apply the predicate to.</param> 25this IAsyncEnumerable<TSource> source, 52/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> that contains the elements to apply the predicate to.</param> 62this IAsyncEnumerable<TSource> source, 73IAsyncEnumerable<TSource> source,
System\Linq\AnyAsync.cs (8)
15/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> to check for emptiness.</param> 20this IAsyncEnumerable<TSource> source, 28IAsyncEnumerable<TSource> source, 39/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> whose elements to apply the predicate to.</param> 49this IAsyncEnumerable<TSource> source, 76/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> whose elements to apply the predicate to.</param> 86this IAsyncEnumerable<TSource> source, 96IAsyncEnumerable<TSource> source,
System\Linq\Append.cs (4)
19public static IAsyncEnumerable<TSource> Append<TSource>( 20this IAsyncEnumerable<TSource> source, 27static async IAsyncEnumerable<TSource> Impl( 28IAsyncEnumerable<TSource> source,
System\Linq\AsyncEnumerable.cs (1)
9/// Provides a set of static methods for querying objects that implement <see cref="IAsyncEnumerable{T}"/>.
System\Linq\AverageAsync.cs (10)
21this IAsyncEnumerable<int> source, 56this IAsyncEnumerable<long> source, 90this IAsyncEnumerable<float> source, CancellationToken cancellationToken = default) 123this IAsyncEnumerable<double> source, CancellationToken cancellationToken = default) 156this IAsyncEnumerable<decimal> source, CancellationToken cancellationToken = default) 190this IAsyncEnumerable<int?> source, CancellationToken cancellationToken = default) 222this IAsyncEnumerable<long?> source, CancellationToken cancellationToken = default) 253this IAsyncEnumerable<float?> source, CancellationToken cancellationToken = default) 284this IAsyncEnumerable<double?> source, CancellationToken cancellationToken = default) 315this IAsyncEnumerable<decimal?> source, CancellationToken cancellationToken = default)
System\Linq\Cast.cs (8)
14/// Casts the elements of an <see cref="IAsyncEnumerable{Object}"/> to the specified type. 17/// <param name="source">The <see cref="IAsyncEnumerable{Object}"/> that contains the elements to be cast to type <typeparamref name="TResult"/>.</param> 18/// <returns>An <see cref="IAsyncEnumerable{TResult}"/> that contains each element of the source sequence cast to the <typeparamref name="TResult"/> type.</returns> 19public static IAsyncEnumerable<TResult> Cast<TResult>( // satisfies the C# query-expression pattern 20this IAsyncEnumerable<object?> source) 26source as IAsyncEnumerable<TResult> ?? 29static async IAsyncEnumerable<TResult> Impl( 30IAsyncEnumerable<object?> source,
System\Linq\Chunk.cs (6)
19/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> whose elements to chunk.</param> 22/// An <see cref="IAsyncEnumerable{T}"/> that contains the elements of the input sequence split into chunks of size <paramref name="size"/>. 26public static IAsyncEnumerable<TSource[]> Chunk<TSource>( 27this IAsyncEnumerable<TSource> source, 37async static IAsyncEnumerable<TSource[]> Chunk( 38IAsyncEnumerable<TSource> source,
System\Linq\Concat.cs (7)
17/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains the concatenated elements of the two input sequences.</returns> 20public static IAsyncEnumerable<TSource> Concat<TSource>( 21this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TSource> second) 31static async IAsyncEnumerable<TSource> Impl( 32IAsyncEnumerable<TSource> first, 33IAsyncEnumerable<TSource> second,
System\Linq\ContainsAsync.cs (1)
22this IAsyncEnumerable<TSource> source,
System\Linq\CountAsync.cs (10)
21this IAsyncEnumerable<TSource> source, 29IAsyncEnumerable<TSource> source, 53this IAsyncEnumerable<TSource> source, 88this IAsyncEnumerable<TSource> source, 98IAsyncEnumerable<TSource> source, 122this IAsyncEnumerable<TSource> source, 130IAsyncEnumerable<TSource> source, 153this IAsyncEnumerable<TSource> source, 187this IAsyncEnumerable<TSource> source, 197IAsyncEnumerable<TSource> source,
System\Linq\CountBy.cs (8)
23public static IAsyncEnumerable<KeyValuePair<TKey, int>> CountBy<TSource, TKey>( 24this IAsyncEnumerable<TSource> source, 35static async IAsyncEnumerable<KeyValuePair<TKey, int>> Impl( 36IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer, [EnumeratorCancellation] CancellationToken cancellationToken) 74public static IAsyncEnumerable<KeyValuePair<TKey, int>> CountBy<TSource, TKey>( 75this IAsyncEnumerable<TSource> source, 86static async IAsyncEnumerable<KeyValuePair<TKey, int>> Impl( 87IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IEqualityComparer<TKey>? keyComparer, [EnumeratorCancellation] CancellationToken cancellationToken)
System\Linq\DefaultIfEmpty.cs (8)
16/// An <see cref="IAsyncEnumerable{T}"/> object that contains the default value for 20public static IAsyncEnumerable<TSource?> DefaultIfEmpty<TSource>( 21this IAsyncEnumerable<TSource> source) => 29/// An <see cref="IAsyncEnumerable{T}"/> object that contains the default value for 33public static IAsyncEnumerable<TSource> DefaultIfEmpty<TSource>( 34this IAsyncEnumerable<TSource> source, TSource defaultValue) 40static async IAsyncEnumerable<TSource> Impl( 41IAsyncEnumerable<TSource> source,
System\Linq\Distinct.cs (5)
16/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains distinct elements from the source sequence.</returns> 18public static IAsyncEnumerable<TSource> Distinct<TSource>( 19this IAsyncEnumerable<TSource> source, 28static async IAsyncEnumerable<TSource> Impl( 29IAsyncEnumerable<TSource> source,
System\Linq\DistinctBy.cs (12)
19/// <returns>An <see cref="IAsyncEnumerable{T}" /> that contains distinct elements from the source sequence.</returns> 23/// <para>The <see cref="DistinctBy{TSource, TKey}(IAsyncEnumerable{TSource}, Func{TSource, TKey}, IEqualityComparer{TKey}?)" /> method returns an unordered sequence that contains no duplicate values. If <paramref name="comparer" /> is <see langword="null" />, the default equality comparer, <see cref="EqualityComparer{T}.Default" />, is used to compare values.</para> 27public static IAsyncEnumerable<TSource> DistinctBy<TSource, TKey>( 28this IAsyncEnumerable<TSource> source, 39static async IAsyncEnumerable<TSource> Impl( 40IAsyncEnumerable<TSource> source, 69/// <returns>An <see cref="IAsyncEnumerable{T}" /> that contains distinct elements from the source sequence.</returns> 73/// <para>The <see cref="DistinctBy{TSource, TKey}(IAsyncEnumerable{TSource}, Func{TSource, CancellationToken, ValueTask{TKey}}, IEqualityComparer{TKey}?)" /> method returns an unordered sequence that contains no duplicate values. If <paramref name="comparer" /> is <see langword="null" />, the default equality comparer, <see cref="EqualityComparer{T}.Default" />, is used to compare values.</para> 77public static IAsyncEnumerable<TSource> DistinctBy<TSource, TKey>( 78this IAsyncEnumerable<TSource> source, 89static async IAsyncEnumerable<TSource> Impl( 90IAsyncEnumerable<TSource> source,
System\Linq\ElementAtAsync.cs (10)
14/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return an element from.</param> 21this IAsyncEnumerable<TSource> source, 32/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return an element from.</param> 41this IAsyncEnumerable<TSource> source, 52/// <param name="source">An <see cref="IAsyncEnumerable{T}" /> to return an element from.</param> 65this IAsyncEnumerable<TSource> source, 81/// <param name="source">An <see cref="IAsyncEnumerable{T}" /> to return an element from.</param> 92this IAsyncEnumerable<TSource> source, 107IAsyncEnumerable<TSource> source, 136IAsyncEnumerable<TSource> source,
System\Linq\Empty.cs (4)
13/// Returns an empty <see cref="IAsyncEnumerable{T}"/> that has the specified type argument. 16/// <returns>An empty <see cref="IAsyncEnumerable{T}"/> whose type argument is <typeparamref name="TResult"/>.</returns> 17public static IAsyncEnumerable<TResult> Empty<TResult>() => EmptyAsyncEnumerable<TResult>.Instance; 20private static bool IsKnownEmpty<TResult>(this IAsyncEnumerable<TResult> source) =>
System\Linq\Except.cs (8)
15/// <param name="first">An <see cref="IAsyncEnumerable{T}"/> whose elements that are not also in second will be returned.</param> 16/// <param name="second">An <see cref="IAsyncEnumerable{T}"/> whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.</param> 21public static IAsyncEnumerable<TSource> Except<TSource>( 22this IAsyncEnumerable<TSource> first, 23IAsyncEnumerable<TSource> second, 33async static IAsyncEnumerable<TSource> Impl( 34IAsyncEnumerable<TSource> first, 35IAsyncEnumerable<TSource> second,
System\Linq\ExceptBy.cs (16)
18/// <param name="first">An <see cref="IAsyncEnumerable{TSource}" /> whose keys that are not also in <paramref name="second"/> will be returned.</param> 19/// <param name="second">An <see cref="IAsyncEnumerable{TKey}" /> whose keys that also occur in the first sequence will cause those elements to be removed from the returned sequence.</param> 26public static IAsyncEnumerable<TSource> ExceptBy<TSource, TKey>( 27this IAsyncEnumerable<TSource> first, 28IAsyncEnumerable<TKey> second, 40static async IAsyncEnumerable<TSource> Impl( 41IAsyncEnumerable<TSource> first, 42IAsyncEnumerable<TKey> second, 78/// <param name="first">An <see cref="IAsyncEnumerable{TSource}" /> whose keys that are not also in <paramref name="second"/> will be returned.</param> 79/// <param name="second">An <see cref="IAsyncEnumerable{TKey}" /> whose keys that also occur in the first sequence will cause those elements to be removed from the returned sequence.</param> 86public static IAsyncEnumerable<TSource> ExceptBy<TSource, TKey>( 87this IAsyncEnumerable<TSource> first, 88IAsyncEnumerable<TKey> second, 100static async IAsyncEnumerable<TSource> Impl( 101IAsyncEnumerable<TSource> first, 102IAsyncEnumerable<TKey> second,
System\Linq\FirstAsync.cs (22)
15/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> to return the first element of.</param> 21this IAsyncEnumerable<TSource> source, 29IAsyncEnumerable<TSource> source, 45/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return an element from.</param> 56this IAsyncEnumerable<TSource> source, 84/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return an element from.</param> 95this IAsyncEnumerable<TSource> source, 105IAsyncEnumerable<TSource> source, 124/// <param name="source">The <see cref="IAsyncEnumerable{T}" /> to return the first element of.</param> 129this IAsyncEnumerable<TSource> source, 135/// <param name="source">The <see cref="IAsyncEnumerable{T}" /> to return the first element of.</param> 141this IAsyncEnumerable<TSource> source, 150IAsyncEnumerable<TSource> source, 162/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return an element from.</param> 172this IAsyncEnumerable<TSource> source, 179/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return an element from.</param> 189this IAsyncEnumerable<TSource> source, 196/// <param name="source">An <see cref="IAsyncEnumerable{T}" /> to return an element from.</param> 204this IAsyncEnumerable<TSource> source, 233/// <param name="source">An <see cref="IAsyncEnumerable{T}" /> to return an element from.</param> 241this IAsyncEnumerable<TSource> source, 252IAsyncEnumerable<TSource> source,
System\Linq\GroupBy.cs (44)
18/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> of elements to group.</param> 22/// An <see cref="IAsyncEnumerable{IGrouping}"/> where each <see cref="IGrouping{TKey, TElement}"/> 27public static IAsyncEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>( // satisfies the C# query-expression pattern 28this IAsyncEnumerable<TSource> source, 39static async IAsyncEnumerable<IGrouping<TKey, TSource>> Impl( 40IAsyncEnumerable<TSource> source, 55/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> of elements to group.</param> 59/// An <see cref="IAsyncEnumerable{IGrouping}"/> where each <see cref="IGrouping{TKey, TElement}"/> 64public static IAsyncEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>( 65this IAsyncEnumerable<TSource> source, 76static async IAsyncEnumerable<IGrouping<TKey, TSource>> Impl( 77IAsyncEnumerable<TSource> source, 97/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> of elements to group.</param> 102/// An <see cref="IAsyncEnumerable{IGrouping}"/> where each <see cref="IGrouping{TKey, TElement}"/> 108public static IAsyncEnumerable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>( // satisfies the C# query-expression pattern 109this IAsyncEnumerable<TSource> source, 122static async IAsyncEnumerable<IGrouping<TKey, TElement>> Impl( 123IAsyncEnumerable<TSource> source, 144/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> of elements to group.</param> 149/// An <see cref="IAsyncEnumerable{IGrouping}"/> where each <see cref="IGrouping{TKey, TElement}"/> 155public static IAsyncEnumerable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>( 156this IAsyncEnumerable<TSource> source, 169static async IAsyncEnumerable<IGrouping<TKey, TElement>> Impl( 170IAsyncEnumerable<TSource> source, 190/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> of elements to group.</param> 201public static IAsyncEnumerable<TResult> GroupBy<TSource, TKey, TResult>( 202this IAsyncEnumerable<TSource> source, 215static async IAsyncEnumerable<TResult> Impl( 216IAsyncEnumerable<TSource> source, 239/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> of elements to group.</param> 250public static IAsyncEnumerable<TResult> GroupBy<TSource, TKey, TResult>( 251this IAsyncEnumerable<TSource> source, 264static async IAsyncEnumerable<TResult> Impl( 265IAsyncEnumerable<TSource> source, 291/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> of elements to group.</param> 301public static IAsyncEnumerable<TResult> GroupBy<TSource, TKey, TElement, TResult>( 302this IAsyncEnumerable<TSource> source, 317static async IAsyncEnumerable<TResult> Impl( 318IAsyncEnumerable<TSource> source, 345/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> of elements to group.</param> 355public static IAsyncEnumerable<TResult> GroupBy<TSource, TKey, TElement, TResult>( 356this IAsyncEnumerable<TSource> source, 371static async IAsyncEnumerable<TResult> Impl( 372IAsyncEnumerable<TSource> source,
System\Linq\GroupJoin.cs (14)
28/// An <see cref="IAsyncEnumerable{T}"/> that contains elements of type <typeparamref name="TResult"/> 36public static IAsyncEnumerable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>( // satisfies the C# query-expression pattern 37this IAsyncEnumerable<TOuter> outer, 38IAsyncEnumerable<TInner> inner, 54static async IAsyncEnumerable<TResult> Impl( 55IAsyncEnumerable<TOuter> outer, 56IAsyncEnumerable<TInner> inner, 93/// An <see cref="IAsyncEnumerable{T}"/> that contains elements of type <typeparamref name="TResult"/> 101public static IAsyncEnumerable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>( 102this IAsyncEnumerable<TOuter> outer, 103IAsyncEnumerable<TInner> inner, 119static async IAsyncEnumerable<TResult> Impl( 120IAsyncEnumerable<TOuter> outer, 121IAsyncEnumerable<TInner> inner,
System\Linq\Index.cs (4)
18public static IAsyncEnumerable<(int Index, TSource Item)> Index<TSource>( 19this IAsyncEnumerable<TSource> source) 27static async IAsyncEnumerable<(int Index, TSource Item)> Impl( 28IAsyncEnumerable<TSource> source,
System\Linq\InfiniteSequence.cs (3)
18/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains the sequence.</returns> 19public static IAsyncEnumerable<T> InfiniteSequence<T>(T start, T step) where T : IAdditionOperators<T, T, T> 33static async IAsyncEnumerable<T> Iterator(T start, T step)
System\Linq\Intersect.cs (8)
15/// <param name="first">An <see cref="IAsyncEnumerable{T}"/> whose distinct elements that also appear in second will be returned.</param> 16/// <param name="second">An <see cref="IAsyncEnumerable{T}"/> whose distinct elements that also appear in the first sequence will be returned.</param> 21public static IAsyncEnumerable<TSource> Intersect<TSource>( 22this IAsyncEnumerable<TSource> first, 23IAsyncEnumerable<TSource> second, 33static async IAsyncEnumerable<TSource> Impl( 34IAsyncEnumerable<TSource> first, 35IAsyncEnumerable<TSource> second,
System\Linq\IntersectBy.cs (16)
16/// <param name="first">An <see cref="IAsyncEnumerable{T}" /> whose distinct elements that also appear in <paramref name="second" /> will be returned.</param> 17/// <param name="second">An <see cref="IAsyncEnumerable{T}" /> whose distinct elements that also appear in the first sequence will be returned.</param> 31public static IAsyncEnumerable<TSource> IntersectBy<TSource, TKey>( 32this IAsyncEnumerable<TSource> first, 33IAsyncEnumerable<TKey> second, 45static async IAsyncEnumerable<TSource> Impl( 46IAsyncEnumerable<TSource> first, 47IAsyncEnumerable<TKey> second, 81/// <param name="first">An <see cref="IAsyncEnumerable{T}" /> whose distinct elements that also appear in <paramref name="second" /> will be returned.</param> 82/// <param name="second">An <see cref="IAsyncEnumerable{T}" /> whose distinct elements that also appear in the first sequence will be returned.</param> 96public static IAsyncEnumerable<TSource> IntersectBy<TSource, TKey>( 97this IAsyncEnumerable<TSource> first, 98IAsyncEnumerable<TKey> second, 110static async IAsyncEnumerable<TSource> Impl( 111IAsyncEnumerable<TSource> first, 112IAsyncEnumerable<TKey> second,
System\Linq\Join.cs (14)
25/// An <see cref="IAsyncEnumerable{T}"/> that has elements of type <typeparamref name="TResult"/> 33public static IAsyncEnumerable<TResult> Join<TOuter, TInner, TKey, TResult>( // satisfies the C# query-expression pattern 34this IAsyncEnumerable<TOuter> outer, 35IAsyncEnumerable<TInner> inner, 51static async IAsyncEnumerable<TResult> Impl( 52IAsyncEnumerable<TOuter> outer, IAsyncEnumerable<TInner> inner, 98/// An <see cref="IAsyncEnumerable{T}"/> that has elements of type <typeparamref name="TResult"/> 106public static IAsyncEnumerable<TResult> Join<TOuter, TInner, TKey, TResult>( 107this IAsyncEnumerable<TOuter> outer, 108IAsyncEnumerable<TInner> inner, 124static async IAsyncEnumerable<TResult> Impl( 125IAsyncEnumerable<TOuter> outer, 126IAsyncEnumerable<TInner> inner,
System\Linq\LastAsync.cs (26)
14/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return the last element of.</param> 20this IAsyncEnumerable<TSource> source, 28IAsyncEnumerable<TSource> source, 51/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return an element from.</param> 62this IAsyncEnumerable<TSource> source, 72IAsyncEnumerable<TSource> source, 105/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return an element from.</param> 116this IAsyncEnumerable<TSource> source, 126IAsyncEnumerable<TSource> source, 159/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return an element from.</param> 163/// otherwise, the last element in the <see cref="IAsyncEnumerable{T}"/>. 167this IAsyncEnumerable<TSource> source, 173/// <param name="source">An <see cref="IAsyncEnumerable{T}" /> to return the last element of.</param> 176/// <returns><paramref name="defaultValue" /> if the source sequence is empty; otherwise, the last element in the <see cref="IAsyncEnumerable{T}" />.</returns> 179this IAsyncEnumerable<TSource> source, 188IAsyncEnumerable<TSource> source, TSource defaultValue, CancellationToken cancellationToken) 208/// <param name="source">An <see cref="IAsyncEnumerable{T}" /> to return an element from.</param> 215this IAsyncEnumerable<TSource> source, 222/// <param name="source">An <see cref="IAsyncEnumerable{T}" /> to return an element from.</param> 229this IAsyncEnumerable<TSource> source, 236/// <param name="source">An <see cref="IAsyncEnumerable{T}" /> to return an element from.</param> 244this IAsyncEnumerable<TSource> source, 255IAsyncEnumerable<TSource> source, 289/// <param name="source">An <see cref="IAsyncEnumerable{T}" /> to return an element from.</param> 297this IAsyncEnumerable<TSource> source, 308IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, TSource defaultValue, CancellationToken cancellationToken)
System\Linq\LeftJoin.cs (13)
24/// <returns>An <see cref="IAsyncEnumerable{T}" /> that has elements of type <typeparamref name="TResult" /> that are obtained by performing a left outer join on two sequences.</returns> 30public static IAsyncEnumerable<TResult> LeftJoin<TOuter, TInner, TKey, TResult>( 31this IAsyncEnumerable<TOuter> outer, 32IAsyncEnumerable<TInner> inner, 48static async IAsyncEnumerable<TResult> Impl( 49IAsyncEnumerable<TOuter> outer, IAsyncEnumerable<TInner> inner, 101public static IAsyncEnumerable<TResult> LeftJoin<TOuter, TInner, TKey, TResult>( 102this IAsyncEnumerable<TOuter> outer, 103IAsyncEnumerable<TInner> inner, 119static async IAsyncEnumerable<TResult> Impl( 120IAsyncEnumerable<TOuter> outer, 121IAsyncEnumerable<TInner> inner,
System\Linq\MaxAsync.cs (11)
21/// <para>If type <typeparamref name="TSource" /> implements <see cref="IComparable{T}" />, the <see cref="MaxAsync{TSource}(IAsyncEnumerable{TSource}, IComparer{TSource}?, CancellationToken)" /> method uses that implementation to compare values. Otherwise, if type <typeparamref name="TSource" /> implements <see cref="IComparable" />, that implementation is used to compare values.</para> 25this IAsyncEnumerable<TSource> source, 38return (ValueTask<TSource?>)(object)MaxAsync((IAsyncEnumerable<float>)(object)source, cancellationToken); 43return (ValueTask<TSource?>)(object)MaxAsync((IAsyncEnumerable<double>)(object)source, cancellationToken); 48return (ValueTask<TSource?>)(object)MaxAsync((IAsyncEnumerable<float?>)(object)source, cancellationToken); 53return (ValueTask<TSource?>)(object)MaxAsync((IAsyncEnumerable<double?>)(object)source, cancellationToken); 60IAsyncEnumerable<TSource> source, 130this IAsyncEnumerable<float> source, 171this IAsyncEnumerable<double> source, 211private static async ValueTask<float?> MaxAsync(IAsyncEnumerable<float?> source, CancellationToken cancellationToken) 234private static async ValueTask<double?> MaxAsync(IAsyncEnumerable<double?> source, CancellationToken cancellationToken)
System\Linq\MaxByAsync.cs (4)
26this IAsyncEnumerable<TSource> source, 37IAsyncEnumerable<TSource> source, 136this IAsyncEnumerable<TSource> source, 147IAsyncEnumerable<TSource> source,
System\Linq\MinAsync.cs (11)
21/// <para>If type <typeparamref name="TSource" /> implements <see cref="IComparable{T}" />, the <see cref="MinAsync{TSource}(IAsyncEnumerable{TSource}, IComparer{TSource}?, CancellationToken)" /> method uses that implementation to compare values. Otherwise, if type <typeparamref name="TSource" /> implements <see cref="IComparable" />, that implementation is used to compare values.</para> 25this IAsyncEnumerable<TSource> source, 38return (ValueTask<TSource?>)(object)MinAsync((IAsyncEnumerable<float>)(object)source, cancellationToken); 43return (ValueTask<TSource?>)(object)MinAsync((IAsyncEnumerable<double>)(object)source, cancellationToken); 48return (ValueTask<TSource?>)(object)MinAsync((IAsyncEnumerable<float?>)(object)source, cancellationToken); 53return (ValueTask<TSource?>)(object)MinAsync((IAsyncEnumerable<double?>)(object)source, cancellationToken); 59static async ValueTask<TSource?> Impl(IAsyncEnumerable<TSource> source, IComparer<TSource> comparer, CancellationToken cancellationToken) 127IAsyncEnumerable<float> source, 172IAsyncEnumerable<double> source, 217IAsyncEnumerable<float?> source, 242IAsyncEnumerable<double?> source,
System\Linq\MinByAsync.cs (4)
26this IAsyncEnumerable<TSource> source, 37IAsyncEnumerable<TSource> source, 136this IAsyncEnumerable<TSource> source, 147IAsyncEnumerable<TSource> source,
System\Linq\OfType.cs (7)
14/// Filters the elements of a <see cref="IAsyncEnumerable{Object}"/> based on a specified type <typeparamref name="TResult"/>. 17/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> whose elements to filter.</param> 18/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains elements from the input sequence of type <typeparamref name="TResult"/>.</returns> 19public static IAsyncEnumerable<TResult> OfType<TResult>( 20this IAsyncEnumerable<object?> source) 28static async IAsyncEnumerable<TResult> Impl( 29IAsyncEnumerable<object?> source,
System\Linq\OrderBy.cs (19)
17/// <returns>An <see cref="IAsyncEnumerable{TElement}"/> whose elements are sorted.</returns> 20this IAsyncEnumerable<T> source, 30/// <returns>An <see cref="IAsyncEnumerable{TElement}"/> whose elements are sorted according to a key.</returns> 34this IAsyncEnumerable<TSource> source, 52/// <returns>An <see cref="IAsyncEnumerable{TElement}"/> whose elements are sorted according to a key.</returns> 56this IAsyncEnumerable<TSource> source, 72/// <returns>An <see cref="IAsyncEnumerable{TElement}"/> whose elements are sorted in descending order.</returns> 75this IAsyncEnumerable<T> source, 85/// <returns>An <see cref="IAsyncEnumerable{TElement}"/> whose elements are sorted in descending order according to a key.</returns> 89this IAsyncEnumerable<TSource> source, 107/// <returns>An <see cref="IAsyncEnumerable{TElement}"/> whose elements are sorted in descending order according to a key.</returns> 111this IAsyncEnumerable<TSource> source, 129/// <returns>An <see cref="IAsyncEnumerable{TElement}"/> whose elements are sorted according to a key.</returns> 148/// <returns>An <see cref="IAsyncEnumerable{TElement}"/> whose elements are sorted according to a key.</returns> 167/// <returns>An <see cref="IAsyncEnumerable{TElement}"/> whose elements are sorted in descending order according to a key.</returns> 186/// <returns>An <see cref="IAsyncEnumerable{TElement}"/> whose elements are sorted in descending order according to a key.</returns> 201internal readonly IAsyncEnumerable<TElement> _source; 203protected OrderedIterator(IAsyncEnumerable<TElement> source) => _source = source; 226internal OrderedIterator(IAsyncEnumerable<TElement> source, object keySelector, IComparer<TKey>? comparer, bool descending, OrderedIterator<TElement>? parent) :
System\Linq\Prepend.cs (4)
19public static IAsyncEnumerable<TSource> Prepend<TSource>( 20this IAsyncEnumerable<TSource> source, 27static async IAsyncEnumerable<TSource> Impl( 28IAsyncEnumerable<TSource> source,
System\Linq\Range.cs (3)
13/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains a range of sequential integral numbers.</returns> 16public static IAsyncEnumerable<int> Range(int start, int count) 30static async IAsyncEnumerable<int> Impl(int start, int count)
System\Linq\Repeat.cs (3)
14/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains a repeated value.</returns> 16public static IAsyncEnumerable<TResult> Repeat<TResult>(TResult element, int count) 27static async IAsyncEnumerable<TResult> Impl(TResult element, int count)
System\Linq\Reverse.cs (4)
17public static IAsyncEnumerable<TSource> Reverse<TSource>( 18this IAsyncEnumerable<TSource> source) 26static async IAsyncEnumerable<TSource> Impl( 27IAsyncEnumerable<TSource> source,
System\Linq\RightJoin.cs (14)
24/// <returns>An <see cref="IAsyncEnumerable{T}" /> that has elements of type <typeparamref name="TResult" /> that are obtained by performing a right outer join on two sequences.</returns> 30public static IAsyncEnumerable<TResult> RightJoin<TOuter, TInner, TKey, TResult>( 31this IAsyncEnumerable<TOuter> outer, 32IAsyncEnumerable<TInner> inner, 48static async IAsyncEnumerable<TResult> Impl( 49IAsyncEnumerable<TOuter> outer, 50IAsyncEnumerable<TInner> inner, 96/// <returns>An <see cref="IAsyncEnumerable{T}" /> that has elements of type <typeparamref name="TResult" /> that are obtained by performing a right outer join on two sequences.</returns> 102public static IAsyncEnumerable<TResult> RightJoin<TOuter, TInner, TKey, TResult>( 103this IAsyncEnumerable<TOuter> outer, 104IAsyncEnumerable<TInner> inner, 120static async IAsyncEnumerable<TResult> Impl( 121IAsyncEnumerable<TOuter> outer, 122IAsyncEnumerable<TInner> inner,
System\Linq\Select.cs (20)
19/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 24public static IAsyncEnumerable<TResult> Select<TSource, TResult>( // satisfies the C# query-expression pattern 25this IAsyncEnumerable<TSource> source, 35static async IAsyncEnumerable<TResult> Impl( 36IAsyncEnumerable<TSource> source, 53/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 58public static IAsyncEnumerable<TResult> Select<TSource, TResult>( 59this IAsyncEnumerable<TSource> source, 69static async IAsyncEnumerable<TResult> Impl( 70IAsyncEnumerable<TSource> source, 90/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 95public static IAsyncEnumerable<TResult> Select<TSource, TResult>( 96this IAsyncEnumerable<TSource> source, 106static async IAsyncEnumerable<TResult> Impl( 107IAsyncEnumerable<TSource> source, 128/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 133public static IAsyncEnumerable<TResult> Select<TSource, TResult>( 134this IAsyncEnumerable<TSource> source, 144static async IAsyncEnumerable<TResult> Impl( 145IAsyncEnumerable<TSource> source,
System\Linq\SelectMany.cs (93)
15/// flattens the resulting sequences into one <see cref="IAsyncEnumerable{T}"/> sequence. 22/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 27public static IAsyncEnumerable<TResult> SelectMany<TSource, TResult>( 28this IAsyncEnumerable<TSource> source, 38async static IAsyncEnumerable<TResult> Impl( 39IAsyncEnumerable<TSource> source, 55/// flattens the resulting sequences into one <see cref="IAsyncEnumerable{T}"/> sequence. 62/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 67public static IAsyncEnumerable<TResult> SelectMany<TSource, TResult>( 68this IAsyncEnumerable<TSource> source, 78async static IAsyncEnumerable<TResult> Impl( 79IAsyncEnumerable<TSource> source, 94/// Projects each element of a sequence to an <see cref="IAsyncEnumerable{T}"/> and 95/// flattens the resulting sequences into one <see cref="IAsyncEnumerable{T}"/> sequence. 102/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 107public static IAsyncEnumerable<TResult> SelectMany<TSource, TResult>( 108this IAsyncEnumerable<TSource> source, 109Func<TSource, IAsyncEnumerable<TResult>> selector) 118async static IAsyncEnumerable<TResult> Impl( 119IAsyncEnumerable<TSource> source, 120Func<TSource, IAsyncEnumerable<TResult>> selector, 135/// flattens the resulting sequences into one <see cref="IAsyncEnumerable{T}"/> sequence. 143/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 148public static IAsyncEnumerable<TResult> SelectMany<TSource, TResult>( 149this IAsyncEnumerable<TSource> source, 159async static IAsyncEnumerable<TResult> Impl( 160IAsyncEnumerable<TSource> source, 177/// flattens the resulting sequences into one <see cref="IAsyncEnumerable{T}"/> sequence. 185/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 190public static IAsyncEnumerable<TResult> SelectMany<TSource, TResult>( 191this IAsyncEnumerable<TSource> source, 201async static IAsyncEnumerable<TResult> Impl( 202IAsyncEnumerable<TSource> source, 218/// Projects each element of a sequence to an <see cref="IAsyncEnumerable{T}"/> and 219/// flattens the resulting sequences into one <see cref="IAsyncEnumerable{T}"/> sequence. 227/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 232public static IAsyncEnumerable<TResult> SelectMany<TSource, TResult>( 233this IAsyncEnumerable<TSource> source, 234Func<TSource, int, IAsyncEnumerable<TResult>> selector) 243async static IAsyncEnumerable<TResult> Impl( 244IAsyncEnumerable<TSource> source, 245Func<TSource, int, IAsyncEnumerable<TResult>> selector, 261/// flattens the resulting sequences into one <see cref="IAsyncEnumerable{T}"/> sequence, 272/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 280public static IAsyncEnumerable<TResult> SelectMany<TSource, TCollection, TResult>( 281this IAsyncEnumerable<TSource> source, 293async static IAsyncEnumerable<TResult> Impl( 294IAsyncEnumerable<TSource> source, 311/// flattens the resulting sequences into one <see cref="IAsyncEnumerable{T}"/> sequence, 322/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 330public static IAsyncEnumerable<TResult> SelectMany<TSource, TCollection, TResult>( 331this IAsyncEnumerable<TSource> source, 343async static IAsyncEnumerable<TResult> Impl( 344IAsyncEnumerable<TSource> source, 360/// Projects each element of a sequence to an <see cref="IAsyncEnumerable{T}"/>, 361/// flattens the resulting sequences into one <see cref="IAsyncEnumerable{T}"/> sequence, 372/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 380public static IAsyncEnumerable<TResult> SelectMany<TSource, TCollection, TResult>( // satisfies the C# query-expression pattern 381this IAsyncEnumerable<TSource> source, 382Func<TSource, IAsyncEnumerable<TCollection>> collectionSelector, 393async static IAsyncEnumerable<TResult> Impl( 394IAsyncEnumerable<TSource> source, 395Func<TSource, IAsyncEnumerable<TCollection>> collectionSelector, 410/// Projects each element of a sequence to an <see cref="IAsyncEnumerable{T}"/>, 411/// flattens the resulting sequences into one <see cref="IAsyncEnumerable{T}"/> sequence, 422/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 430public static IAsyncEnumerable<TResult> SelectMany<TSource, TCollection, TResult>( 431this IAsyncEnumerable<TSource> source, 432Func<TSource, IAsyncEnumerable<TCollection>> collectionSelector, 443async static IAsyncEnumerable<TResult> Impl( 444IAsyncEnumerable<TSource> source, 445Func<TSource, IAsyncEnumerable<TCollection>> collectionSelector, 461/// flattens the resulting sequences into one <see cref="IAsyncEnumerable{T}"/> sequence, 471/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 479public static IAsyncEnumerable<TResult> SelectMany<TSource, TCollection, TResult>( 480this IAsyncEnumerable<TSource> source, 492static async IAsyncEnumerable<TResult> Impl( 493IAsyncEnumerable<TSource> source, 511/// flattens the resulting sequences into one <see cref="IAsyncEnumerable{T}"/> sequence, 521/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 529public static IAsyncEnumerable<TResult> SelectMany<TSource, TCollection, TResult>( 530this IAsyncEnumerable<TSource> source, 542static async IAsyncEnumerable<TResult> Impl( 543IAsyncEnumerable<TSource> source, 560/// Projects each element of a sequence to an <see cref="IAsyncEnumerable{T}"/>, 561/// flattens the resulting sequences into one <see cref="IAsyncEnumerable{T}"/> sequence, 571/// An <see cref="IAsyncEnumerable{T}"/> whose elements are the result of 579public static IAsyncEnumerable<TResult> SelectMany<TSource, TCollection, TResult>( 580this IAsyncEnumerable<TSource> source, 581Func<TSource, int, IAsyncEnumerable<TCollection>> collectionSelector, 592static async IAsyncEnumerable<TResult> Impl( 593IAsyncEnumerable<TSource> source, 594Func<TSource, int, IAsyncEnumerable<TCollection>> collectionSelector,
System\Linq\Sequence.cs (4)
19/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains the sequence.</returns> 29public static IAsyncEnumerable<T> Sequence<T>(T start, T endInclusive, T step) where T : INumber<T> 96static async IAsyncEnumerable<T> IncrementingIterator(T current, T endInclusive, T step) 122static async IAsyncEnumerable<T> DecrementingIterator(T current, T endInclusive, T step)
System\Linq\SequenceEqualAsync.cs (6)
14/// <param name="first">An <see cref="IAsyncEnumerable{T}"/> to compare to <paramref name="second"/>.</param> 15/// <param name="second">An <see cref="IAsyncEnumerable{T}"/> to compare to the first sequence.</param> 23this IAsyncEnumerable<TSource> first, 24IAsyncEnumerable<TSource> second, 34IAsyncEnumerable<TSource> first, 35IAsyncEnumerable<TSource> second,
System\Linq\Shuffle.cs (4)
22public static IAsyncEnumerable<TSource> Shuffle<TSource>( 23this IAsyncEnumerable<TSource> source) 31static async IAsyncEnumerable<TSource> Impl( 32IAsyncEnumerable<TSource> source,
System\Linq\SingleAsync.cs (24)
17/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return the single element of.</param> 24this IAsyncEnumerable<TSource> source, 32IAsyncEnumerable<TSource> source, CancellationToken cancellationToken) 56/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return the single element of.</param> 66this IAsyncEnumerable<TSource> source, 76IAsyncEnumerable<TSource> source, 109/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return the single element of.</param> 119this IAsyncEnumerable<TSource> source, 129IAsyncEnumerable<TSource> source, 162/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return the single element of.</param> 171this IAsyncEnumerable<TSource> source, 177/// <param name="source">An <see cref="IAsyncEnumerable{T}" /> to return the single element of.</param> 184this IAsyncEnumerable<TSource> source, 193IAsyncEnumerable<TSource> source, 220/// <param name="source">An <see cref="IAsyncEnumerable{T}" /> to return the single element of.</param> 231this IAsyncEnumerable<TSource> source, 242/// <param name="source">An <see cref="IAsyncEnumerable{T}" /> to return the single element of.</param> 253this IAsyncEnumerable<TSource> source, 260/// <param name="source">An <see cref="IAsyncEnumerable{T}" /> to return a single element from.</param> 269this IAsyncEnumerable<TSource> source, 280IAsyncEnumerable<TSource> source, 310/// <param name="source">An <see cref="IAsyncEnumerable{T}" /> to return a single element from.</param> 319this IAsyncEnumerable<TSource> source, 330IAsyncEnumerable<TSource> source,
System\Linq\Skip.cs (6)
14/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return elements from.</param> 16/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains the elements that occur after the specified index in the input sequence.</returns> 18public static IAsyncEnumerable<TSource> Skip<TSource>( 19this IAsyncEnumerable<TSource> source, 29static async IAsyncEnumerable<TSource> Impl( 30IAsyncEnumerable<TSource> source,
System\Linq\SkipLast.cs (3)
15/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return elements from.</param> 22public static IAsyncEnumerable<TSource> SkipLast<TSource>( 23this IAsyncEnumerable<TSource> source,
System\Linq\SkipWhile.cs (24)
18/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return elements from.</param> 21/// An <see cref="IAsyncEnumerable{T}"/> that contains the elements from the 27public static IAsyncEnumerable<TSource> SkipWhile<TSource>( 28this IAsyncEnumerable<TSource> source, 38static async IAsyncEnumerable<TSource> Impl( 39IAsyncEnumerable<TSource> source, 67/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return elements from.</param> 70/// An <see cref="IAsyncEnumerable{T}"/> that contains the elements from the 76public static IAsyncEnumerable<TSource> SkipWhile<TSource>( 77this IAsyncEnumerable<TSource> source, 87static async IAsyncEnumerable<TSource> Impl( 88IAsyncEnumerable<TSource> source, 117/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return elements from.</param> 123/// An <see cref="IAsyncEnumerable{T}"/> that contains the elements from the 129public static IAsyncEnumerable<TSource> SkipWhile<TSource>( 130this IAsyncEnumerable<TSource> source, 140static async IAsyncEnumerable<TSource> Impl( 141IAsyncEnumerable<TSource> source, 171/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to return elements from.</param> 177/// An <see cref="IAsyncEnumerable{T}"/> that contains the elements from the 183public static IAsyncEnumerable<TSource> SkipWhile<TSource>( 184this IAsyncEnumerable<TSource> source, 194static async IAsyncEnumerable<TSource> Impl( 195IAsyncEnumerable<TSource> source,
System\Linq\SumAsync.cs (10)
20this IAsyncEnumerable<int> source, 46this IAsyncEnumerable<long> source, 71this IAsyncEnumerable<float> source, 96this IAsyncEnumerable<double> source, 121this IAsyncEnumerable<decimal> source, 147this IAsyncEnumerable<int?> source, 176this IAsyncEnumerable<long?> source, 204this IAsyncEnumerable<float?> source, 232this IAsyncEnumerable<double?> source, 260this IAsyncEnumerable<decimal?> source,
System\Linq\Take.cs (12)
19/// An <see cref="IAsyncEnumerable{T}"/> that contains the specified number 23public static IAsyncEnumerable<TSource> Take<TSource>( 24this IAsyncEnumerable<TSource> source, 33static async IAsyncEnumerable<TSource> Impl( 34IAsyncEnumerable<TSource> source, 54/// <returns>An <see cref="IAsyncEnumerable{T}" /> that contains the specified <paramref name="range" /> of elements from the <paramref name="source" /> sequence.</returns> 60public static IAsyncEnumerable<TSource> Take<TSource>( 61this IAsyncEnumerable<TSource> source, 93static async IAsyncEnumerable<TSource> Impl( 94IAsyncEnumerable<TSource> source, int startIndex, int endIndex, 121private static async IAsyncEnumerable<TSource> TakeRangeFromEndIterator<TSource>( 122IAsyncEnumerable<TSource> source,
System\Linq\TakeLast.cs (2)
15public static IAsyncEnumerable<TSource> TakeLast<TSource>( 16this IAsyncEnumerable<TSource> source,
System\Linq\TakeWhile.cs (20)
18/// An <see cref="IAsyncEnumerable{T}"/> that contains the elements from the 23public static IAsyncEnumerable<TSource> TakeWhile<TSource>( 24this IAsyncEnumerable<TSource> source, 34static async IAsyncEnumerable<TSource> Impl( 35IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate, 55/// An <see cref="IAsyncEnumerable{T}"/> that contains the elements from the 60public static IAsyncEnumerable<TSource> TakeWhile<TSource>( 61this IAsyncEnumerable<TSource> source, 71static async IAsyncEnumerable<TSource> Impl( 72IAsyncEnumerable<TSource> source, 96/// An <see cref="IAsyncEnumerable{T}"/> that contains the elements from the 101public static IAsyncEnumerable<TSource> TakeWhile<TSource>( 102this IAsyncEnumerable<TSource> source, 112static async IAsyncEnumerable<TSource> Impl( 113IAsyncEnumerable<TSource> source, 138/// An <see cref="IAsyncEnumerable{T}"/> that contains the elements from the 143public static IAsyncEnumerable<TSource> TakeWhile<TSource>( 144this IAsyncEnumerable<TSource> source, 154static async IAsyncEnumerable<TSource> Impl( 155IAsyncEnumerable<TSource> source,
System\Linq\ToArrayAsync.cs (2)
13/// <summary>Creates an array from an <see cref="IAsyncEnumerable{T}"/>.</summary> 20this IAsyncEnumerable<TSource> source,
System\Linq\ToAsyncEnumerable.cs (8)
10/// <summary>Creates a new <see cref="IAsyncEnumerable{T}"/> that iterates through <paramref name="source"/>.</summary> 13/// <returns>An <see cref="IAsyncEnumerable{T}"/> containing the sequence of elements from <paramref name="source"/>.</returns> 16/// Each iteration through the resulting <see cref="IAsyncEnumerable{T}"/> will iterate through the <paramref name="source"/>. 18public static IAsyncEnumerable<TSource> ToAsyncEnumerable<TSource>( 32static async IAsyncEnumerable<TSource> FromArray(TSource[] source) 46static async IAsyncEnumerable<TSource> FromList(List<TSource> source) 54static async IAsyncEnumerable<TSource> FromIList(IList<TSource> source) 63static async IAsyncEnumerable<TSource> FromIterator(IEnumerable<TSource> source)
System\Linq\ToDictionaryAsync.cs (20)
14/// Creates a <see cref="Dictionary{TKey,TValue}"/> from an <see cref="IAsyncEnumerable{T}"/> according to specified key comparer. 18/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> to create a <see cref="Dictionary{TKey,TValue}"/> from.</param> 25this IAsyncEnumerable<KeyValuePair<TKey, TValue>> source, 48/// Creates a <see cref="Dictionary{TKey,TValue}"/> from an <see cref="IAsyncEnumerable{T}"/> according to specified key comparer. 52/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> to create a <see cref="Dictionary{TKey,TValue}"/> from.</param> 59this IAsyncEnumerable<(TKey Key, TValue Value)> source, IEqualityComparer<TKey>? comparer = null, CancellationToken cancellationToken = default) where TKey : notnull => 63/// Creates a <see cref="Dictionary{TKey, TValue}"/> from an <see cref="IAsyncEnumerable{T}"/> 68/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to create a <see cref="Dictionary{TKey, TValue}"/> from.</param> 77this IAsyncEnumerable<TSource> source, 102/// Creates a <see cref="Dictionary{TKey, TValue}"/> from an <see cref="IAsyncEnumerable{T}"/> 107/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to create a <see cref="Dictionary{TKey, TValue}"/> from.</param> 116this IAsyncEnumerable<TSource> source, 127IAsyncEnumerable<TSource> source, 142/// Creates a <see cref="Dictionary{TKey, TValue}"/> from an <see cref="IAsyncEnumerable{T}"/>"/> 148/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to create a <see cref="Dictionary{TKey, TValue}"/> from.</param> 159this IAsyncEnumerable<TSource> source, 188/// Creates a <see cref="Dictionary{TKey, TValue}"/> from an <see cref="IAsyncEnumerable{T}"/>"/> 194/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to create a <see cref="Dictionary{TKey, TValue}"/> from.</param> 205this IAsyncEnumerable<TSource> source, 218IAsyncEnumerable<TSource> source,
System\Linq\ToHashSetAsync.cs (2)
13/// <summary>Creates a <see cref="HashSet{T}"/> from an <see cref="IAsyncEnumerable{T}"/>.</summary> 21this IAsyncEnumerable<TSource> source,
System\Linq\ToListAsync.cs (2)
13/// <summary>Creates a list from an <see cref="IAsyncEnumerable{T}"/>.</summary> 20this IAsyncEnumerable<TSource> source,
System\Linq\ToLookupAsync.cs (17)
16/// Creates a <see cref="ILookup{TKey, TElement}"/> from an <see cref="IAsyncEnumerable{T}"/> 21/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> to create a <see cref="ILookup{TKey, TElement}"/> from.</param> 29this IAsyncEnumerable<TSource> source, 64/// Creates a <see cref="ILookup{TKey, TElement}"/> from an <see cref="IAsyncEnumerable{T}"/> 69/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> to create a <see cref="ILookup{TKey, TElement}"/> from.</param> 77this IAsyncEnumerable<TSource> source, 88IAsyncEnumerable<TSource> source, 113/// Creates a <see cref="ILookup{TKey, TElement}"/> from an <see cref="IAsyncEnumerable{T}"/> 119/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> to create a <see cref="ILookup{TKey, TElement}"/> from.</param> 128this IAsyncEnumerable<TSource> source, 166/// Creates a <see cref="ILookup{TKey, TElement}"/> from an <see cref="IAsyncEnumerable{T}"/> 172/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> to create a <see cref="ILookup{TKey, TElement}"/> from.</param> 181this IAsyncEnumerable<TSource> source, 194IAsyncEnumerable<TSource> source, 281IAsyncEnumerable<TElement> source, 303IAsyncEnumerable<TElement> source, 425internal async IAsyncEnumerable<TResult> ApplyResultSelector<TResult>(
System\Linq\Union.cs (9)
15/// <param name="first">An <see cref="IAsyncEnumerable{T}"/> whose distinct elements form the first set for the union.</param> 16/// <param name="second">An <see cref="IAsyncEnumerable{T}"/> whose distinct elements form the second set for the union.</param> 18/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains the elements from both input sequences, excluding duplicates.</returns> 21public static IAsyncEnumerable<TSource> Union<TSource>( 22this IAsyncEnumerable<TSource> first, 23IAsyncEnumerable<TSource> second, 33static async IAsyncEnumerable<TSource> Impl( 34IAsyncEnumerable<TSource> first, 35IAsyncEnumerable<TSource> second,
System\Linq\UnionBy.cs (18)
16/// <param name="first">An <see cref="IAsyncEnumerable{T}" /> whose distinct elements form the first set for the union.</param> 17/// <param name="second">An <see cref="IAsyncEnumerable{T}" /> whose distinct elements form the second set for the union.</param> 20/// <returns>An <see cref="IAsyncEnumerable{T}" /> that contains the elements from both input sequences, excluding duplicates.</returns> 23public static IAsyncEnumerable<TSource> UnionBy<TSource, TKey>( 24this IAsyncEnumerable<TSource> first, 25IAsyncEnumerable<TSource> second, 37static async IAsyncEnumerable<TSource> Impl( 38IAsyncEnumerable<TSource> first, 39IAsyncEnumerable<TSource> second, 67/// <param name="first">An <see cref="IAsyncEnumerable{T}" /> whose distinct elements form the first set for the union.</param> 68/// <param name="second">An <see cref="IAsyncEnumerable{T}" /> whose distinct elements form the second set for the union.</param> 71/// <returns>An <see cref="IAsyncEnumerable{T}" /> that contains the elements from both input sequences, excluding duplicates.</returns> 74public static IAsyncEnumerable<TSource> UnionBy<TSource, TKey>( 75this IAsyncEnumerable<TSource> first, 76IAsyncEnumerable<TSource> second, 88static async IAsyncEnumerable<TSource> Impl( 89IAsyncEnumerable<TSource> first, 90IAsyncEnumerable<TSource> second,
System\Linq\Where.cs (24)
15/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to filter.</param> 17/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains elements from the input sequence that satisfy the condition.</returns> 20public static IAsyncEnumerable<TSource> Where<TSource>( // satisfies the C# query-expression pattern 21this IAsyncEnumerable<TSource> source, 31static async IAsyncEnumerable<TSource> Impl( 32IAsyncEnumerable<TSource> source, 48/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to filter.</param> 50/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains elements from the input sequence that satisfy the condition.</returns> 53public static IAsyncEnumerable<TSource> Where<TSource>( 54this IAsyncEnumerable<TSource> source, 64static async IAsyncEnumerable<TSource> Impl( 65IAsyncEnumerable<TSource> source, 84/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to filter.</param> 89/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains elements from the input sequence that satisfy the condition.</returns> 92public static IAsyncEnumerable<TSource> Where<TSource>( 93this IAsyncEnumerable<TSource> source, 103static async IAsyncEnumerable<TSource> Impl( 104IAsyncEnumerable<TSource> source, 124/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to filter.</param> 129/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains elements from the input sequence that satisfy the condition.</returns> 132public static IAsyncEnumerable<TSource> Where<TSource>( 133this IAsyncEnumerable<TSource> source, 143static async IAsyncEnumerable<TSource> Impl( 144IAsyncEnumerable<TSource> source,
System\Linq\Zip.cs (28)
23/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains merged elements of two input sequences.</returns> 27public static IAsyncEnumerable<TResult> Zip<TFirst, TSecond, TResult>( 28this IAsyncEnumerable<TFirst> first, 29IAsyncEnumerable<TSecond> second, 40static async IAsyncEnumerable<TResult> Impl( 41IAsyncEnumerable<TFirst> first, 42IAsyncEnumerable<TSecond> second, 67/// <returns>An <see cref="IAsyncEnumerable{T}"/> that contains merged elements of two input sequences.</returns> 71public static IAsyncEnumerable<TResult> Zip<TFirst, TSecond, TResult>( 72this IAsyncEnumerable<TFirst> first, 73IAsyncEnumerable<TSecond> second, 84static async IAsyncEnumerable<TResult> Impl( 85IAsyncEnumerable<TFirst> first, 86IAsyncEnumerable<TSecond> second, 109public static IAsyncEnumerable<(TFirst First, TSecond Second)> Zip<TFirst, TSecond>( 110this IAsyncEnumerable<TFirst> first, 111IAsyncEnumerable<TSecond> second) 120static async IAsyncEnumerable<(TFirst First, TSecond Second)> Impl( 121IAsyncEnumerable<TFirst> first, 122IAsyncEnumerable<TSecond> second, 147public static IAsyncEnumerable<(TFirst First, TSecond Second, TThird Third)> Zip<TFirst, TSecond, TThird>( 148this IAsyncEnumerable<TFirst> first, 149IAsyncEnumerable<TSecond> second, 150IAsyncEnumerable<TThird> third) 160static async IAsyncEnumerable<(TFirst First, TSecond Second, TThird)> Impl( 161IAsyncEnumerable<TFirst> first, IAsyncEnumerable<TSecond> second, IAsyncEnumerable<TThird> third, [EnumeratorCancellation] CancellationToken cancellationToken)
System.Net.Http.Json (23)
System\Net\Http\Json\HttpClientJsonExtensions.Get.AsyncEnumerable.cs (15)
27/// <returns>An <see cref="IAsyncEnumerable{TValue}"/> that represents the deserialized response body.</returns> 31public static IAsyncEnumerable<TValue?> GetFromJsonAsAsyncEnumerable<TValue>( 47/// <returns>An <see cref="IAsyncEnumerable{TValue}"/> that represents the deserialized response body.</returns> 51public static IAsyncEnumerable<TValue?> GetFromJsonAsAsyncEnumerable<TValue>( 67/// <returns>An <see cref="IAsyncEnumerable{TValue}"/> that represents the deserialized response body.</returns> 69public static IAsyncEnumerable<TValue?> GetFromJsonAsAsyncEnumerable<TValue>( 85/// <returns>An <see cref="IAsyncEnumerable{TValue}"/> that represents the deserialized response body.</returns> 87public static IAsyncEnumerable<TValue?> GetFromJsonAsAsyncEnumerable<TValue>( 102/// <returns>An <see cref="IAsyncEnumerable{TValue}"/> that represents the deserialized response body.</returns> 106public static IAsyncEnumerable<TValue?> GetFromJsonAsAsyncEnumerable<TValue>( 120/// <returns>An <see cref="IAsyncEnumerable{TValue}"/> that represents the deserialized response body.</returns> 124public static IAsyncEnumerable<TValue?> GetFromJsonAsAsyncEnumerable<TValue>( 132private static IAsyncEnumerable<TValue?> FromJsonStreamAsyncCore<TValue>( 143private static IAsyncEnumerable<TValue?> FromJsonStreamAsyncCore<TValue>( 153static async IAsyncEnumerable<TValue?> Core(
System\Net\Http\Json\HttpContentJsonExtensions.AsyncEnumerable.cs (8)
24/// <returns>An <see cref="IAsyncEnumerable{TValue}"/> that represents the deserialized response body.</returns> 30public static IAsyncEnumerable<TValue?> ReadFromJsonAsAsyncEnumerable<TValue>( 44/// <returns>An <see cref="IAsyncEnumerable{TValue}"/> that represents the deserialized response body.</returns> 50public static IAsyncEnumerable<TValue?> ReadFromJsonAsAsyncEnumerable<TValue>( 68/// <returns>An <see cref="IAsyncEnumerable{TValue}"/> that represents the deserialized response body.</returns> 72public static IAsyncEnumerable<TValue?> ReadFromJsonAsAsyncEnumerable<TValue>( 84private static IAsyncEnumerable<TValue?> ReadFromJsonAsAsyncEnumerableCore<TValue>( 93private static async IAsyncEnumerable<TValue?> ReadFromJsonAsAsyncEnumerableCore<TValue>(
System.Net.ServerSentEvents (4)
System\Net\ServerSentEvents\SseFormatter.cs (3)
27public static Task WriteAsync(IAsyncEnumerable<SseItem<string>> source, Stream destination, CancellationToken cancellationToken = default) 51public static Task WriteAsync<T>(IAsyncEnumerable<SseItem<T>> source, Stream destination, Action<SseItem<T>, IBufferWriter<byte>> itemFormatter, CancellationToken cancellationToken = default) 71private static async Task WriteAsyncCore<T>(IAsyncEnumerable<SseItem<T>> source, Stream destination, Action<SseItem<T>, IBufferWriter<byte>> itemFormatter, CancellationToken cancellationToken)
System\Net\ServerSentEvents\SseParser_1.cs (1)
176public async IAsyncEnumerable<SseItem<T>> EnumerateAsync([EnumeratorCancellation] CancellationToken cancellationToken = default)
System.Private.CoreLib (22)
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (3)
899public static IAsyncEnumerable<string> ReadLinesAsync(string path, CancellationToken cancellationToken = default) 909public static IAsyncEnumerable<string> ReadLinesAsync(string path, Encoding encoding, CancellationToken cancellationToken = default) 1629private static async IAsyncEnumerable<string> IterateFileLinesAsync(StreamReader sr, string path, Encoding encoding, CancellationToken ctEnumerable, [EnumeratorCancellation] CancellationToken ctEnumerator = default)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConfiguredCancelableAsyncEnumerable.cs (3)
17private readonly IAsyncEnumerable<T> _enumerable; 21internal ConfiguredCancelableAsyncEnumerable(IAsyncEnumerable<T> enumerable, bool continueOnCapturedContext, CancellationToken cancellationToken) 35/// <summary>Sets the <see cref="CancellationToken"/> to be passed to <see cref="IAsyncEnumerable{T}.GetAsyncEnumerator(CancellationToken)"/> when iterating.</summary>
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (9)
6853/// <summary>Creates an <see cref="IAsyncEnumerable{T}"/> that will yield the supplied tasks as those tasks complete.</summary> 6855/// <returns>An <see cref="IAsyncEnumerable{T}"/> for iterating through the supplied tasks.</returns> 6862public static IAsyncEnumerable<Task> WhenEach(params Task[] tasks) 6870public static IAsyncEnumerable<Task> WhenEach(params ReadOnlySpan<Task> tasks) => 6875public static IAsyncEnumerable<Task> WhenEach(IEnumerable<Task> tasks) => 6881public static IAsyncEnumerable<Task<TResult>> WhenEach<TResult>(params Task<TResult>[] tasks) 6890public static IAsyncEnumerable<Task<TResult>> WhenEach<TResult>(params ReadOnlySpan<Task<TResult>> tasks) => 6896public static IAsyncEnumerable<Task<TResult>> WhenEach<TResult>(IEnumerable<Task<TResult>> tasks) => 6991public static async IAsyncEnumerable<T> Iterate<T>(WhenEachState? waiter, [EnumeratorCancellation] CancellationToken cancellationToken = default) where T : Task
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskAsyncEnumerableExtensions.cs (3)
25this IAsyncEnumerable<T> source, bool continueOnCapturedContext) 31/// <summary>Sets the <see cref="CancellationToken"/> to be passed to <see cref="IAsyncEnumerable{T}.GetAsyncEnumerator(CancellationToken)"/> when iterating.</summary> 37this IAsyncEnumerable<T> source, CancellationToken cancellationToken)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskAsyncEnumerableExtensions.ToBlockingEnumerable.cs (4)
15/// Converts an <see cref="IAsyncEnumerable{T}"/> instance into an <see cref="IEnumerable{T}"/> that enumerates elements in a blocking manner. 20/// <returns>An <see cref="IEnumerable{T}"/> instance that enumerates the source <see cref="IAsyncEnumerable{T}"/> in a blocking manner.</returns> 22/// This method is implemented by using deferred execution. The underlying <see cref="IAsyncEnumerable{T}"/> will not be enumerated 27public static IEnumerable<T> ToBlockingEnumerable<T>(this IAsyncEnumerable<T> source, CancellationToken cancellationToken = default)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
77[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IAsyncEnumerable<>))]
System.Text.Json (21)
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableConverterFactory.cs (2)
13/// Converter for streaming <see cref="IAsyncEnumerable{T}" /> values. 33=> type.GetCompatibleGenericInterface(typeof(IAsyncEnumerable<>));
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableOfTConverter.cs (2)
13where TAsyncEnumerable : IAsyncEnumerable<TElement> 17if (!typeToConvert.IsAssignableFrom(typeof(IAsyncEnumerable<TElement>)))
System\Text\Json\Serialization\Converters\Collection\JsonCollectionConverter.cs (1)
13/// or a variant thereof e.g. <see cref="IAsyncEnumerable{T}"/>.
System\Text\Json\Serialization\JsonSerializer.Read.Stream.cs (14)
350/// Wraps the UTF-8 encoded text into an <see cref="IAsyncEnumerable{TValue}" /> 354/// <returns>An <see cref="IAsyncEnumerable{TValue}" /> representation of the provided JSON array.</returns> 363public static IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>( 372/// Wraps the UTF-8 encoded text into an <see cref="IAsyncEnumerable{TValue}" /> 376/// <returns>An <see cref="IAsyncEnumerable{TValue}" /> representation of the provided JSON sequence.</returns> 392public static IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>( 405/// Wraps the UTF-8 encoded text into an <see cref="IAsyncEnumerable{TValue}" /> 409/// <returns>An <see cref="IAsyncEnumerable{TValue}" /> representation of the provided JSON array.</returns> 416public static IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>( 425/// Wraps the UTF-8 encoded text into an <see cref="IAsyncEnumerable{TValue}" /> 429/// <returns>An <see cref="IAsyncEnumerable{TValue}" /> representation of the provided JSON sequence.</returns> 443public static IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>( 456private static IAsyncEnumerable<T?> DeserializeAsyncEnumerableCore<T>( 478static async IAsyncEnumerable<T?> CreateAsyncEnumerableFromArray(
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Collections.cs (2)
323/// Creates serialization metadata for types assignable to <see cref="IAsyncEnumerable{T}"/>. 334where TCollection : IAsyncEnumerable<TElement>
System.Threading.Channels (2)
System\Threading\Channels\ChannelReader.cs (2)
96/// <summary>Creates an <see cref="IAsyncEnumerable{T}"/> that enables reading all of the data from the channel.</summary> 103public virtual async IAsyncEnumerable<T> ReadAllAsync([EnumeratorCancellation] CancellationToken cancellationToken = default)
System.Threading.Tasks.Dataflow (12)
Base\DataflowBlock.IAsyncEnumerable.cs (3)
11/// <summary>Creates an <see cref="IAsyncEnumerable{TOutput}"/> that enables receiving all of the data from the source.</summary> 17public static IAsyncEnumerable<TOutput> ReceiveAllAsync<TOutput>(this IReceivableSourceBlock<TOutput> source, CancellationToken cancellationToken = default) 23static async IAsyncEnumerable<TOutput> Core(IReceivableSourceBlock<TOutput> source, [EnumeratorCancellation] CancellationToken cancellationToken)
Blocks\TransformManyBlock.IAsyncEnumerable.cs (9)
14/// The function to invoke with each data element received. All of the data from the returned <see cref="IAsyncEnumerable{TOutput}"/> 18public TransformManyBlock(Func<TInput, IAsyncEnumerable<TOutput>> transform) : 25/// The function to invoke with each data element received. All of the data from the returned <see cref="IAsyncEnumerable{TOutput}"/> 30public TransformManyBlock(Func<TInput, IAsyncEnumerable<TOutput>> transform, ExecutionDataflowBlockOptions dataflowBlockOptions) 54private async Task ProcessMessageAsync(Func<TInput, IAsyncEnumerable<TOutput>> transformFunction, KeyValuePair<TInput, long> messageWithId) 59IAsyncEnumerable<TOutput> outputItems = transformFunction(messageWithId.Key); 89KeyValuePair<TInput, long> messageWithId, IAsyncEnumerable<TOutput>? outputItems) 117private async Task StoreOutputItemsReorderedAsync(long id, IAsyncEnumerable<TOutput>? item) 193private async Task StoreOutputItemsNonReorderedWithIterationAsync(IAsyncEnumerable<TOutput> outputItems)
System.Threading.Tasks.Parallel (9)
System\Threading\Tasks\Parallel.ForEachAsync.cs (9)
346/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 353public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 361/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 369public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 377/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 384public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 393/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 402private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 713IAsyncEnumerable<TSource> source, Func<object, Task> taskBody,
Test.Utilities (27)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (12)
19public static readonly IAsyncEnumerable<T> Empty = GetEmptyAsync(); 22private static async IAsyncEnumerable<T> GetEmptyAsync() 30internal static async IAsyncEnumerable<T> SingletonAsync<T>(T value) 36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken) 46/// Takes an array of <see cref="IAsyncEnumerable{T}"/>s and produces a single resultant <see 47/// cref="IAsyncEnumerable{T}"/> with all their values merged together. Absolutely no ordering guarantee is 52/// cref="IAsyncEnumerable{T}"/>, but one final stream is desired as the result.</remarks> 53public static IAsyncEnumerable<T> MergeAsync<T>(this ImmutableArray<IAsyncEnumerable<T>> streams, CancellationToken cancellationToken) 74static async Task ProcessAsync(IAsyncEnumerable<T> stream, ChannelWriter<T> writer, CancellationToken cancellationToken) 81public static async IAsyncEnumerable<T> ReadAllAsync<T>( 106public static async IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IEnumerable<TSource> source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
84Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 107Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 119IAsyncEnumerable<TSource> source, 121Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 156IAsyncEnumerable<TSource> source, 177Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189IAsyncEnumerable<TSource> source, 191Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 222IAsyncEnumerable<TSource> source, 241IAsyncEnumerable<TSource> source, 265public static IAsyncEnumerable<TItem> RunAsync<TArgs>( 301/// but returns value as an <see cref="IAsyncEnumerable{TItem}"/>. Versus an <see cref="ImmutableArray{TItem}"/>. 305public static IAsyncEnumerable<TItem> RunParallelStreamAsync<TSource, TArgs>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.cs (2)
44IAsyncEnumerable<TSource> source, 56IAsyncEnumerable<TSource> source,
TestDiscoveryWorker (1)
Program.cs (1)
121public async IAsyncEnumerable<string> GetTestCaseNamesAsync()
Text.Analyzers (36)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (12)
19public static readonly IAsyncEnumerable<T> Empty = GetEmptyAsync(); 22private static async IAsyncEnumerable<T> GetEmptyAsync() 30internal static async IAsyncEnumerable<T> SingletonAsync<T>(T value) 36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken) 46/// Takes an array of <see cref="IAsyncEnumerable{T}"/>s and produces a single resultant <see 47/// cref="IAsyncEnumerable{T}"/> with all their values merged together. Absolutely no ordering guarantee is 52/// cref="IAsyncEnumerable{T}"/>, but one final stream is desired as the result.</remarks> 53public static IAsyncEnumerable<T> MergeAsync<T>(this ImmutableArray<IAsyncEnumerable<T>> streams, CancellationToken cancellationToken) 74static async Task ProcessAsync(IAsyncEnumerable<T> stream, ChannelWriter<T> writer, CancellationToken cancellationToken) 81public static async IAsyncEnumerable<T> ReadAllAsync<T>( 106public static async IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IEnumerable<TSource> source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
84Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 107Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 119IAsyncEnumerable<TSource> source, 121Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems, 156IAsyncEnumerable<TSource> source, 177Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189IAsyncEnumerable<TSource> source, 191Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 222IAsyncEnumerable<TSource> source, 241IAsyncEnumerable<TSource> source, 265public static IAsyncEnumerable<TItem> RunAsync<TArgs>( 301/// but returns value as an <see cref="IAsyncEnumerable{TItem}"/>. Versus an <see cref="ImmutableArray{TItem}"/>. 305public static IAsyncEnumerable<TItem> RunParallelStreamAsync<TSource, TArgs>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.cs (2)
44IAsyncEnumerable<TSource> source, 56IAsyncEnumerable<TSource> source,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (9)
212/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 219public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 229/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 237public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 247/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 254public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 269/// <summary>Executes a for each operation on an <see cref="IAsyncEnumerable{TSource}"/> in which iterations may run in parallel.</summary> 278private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 614IAsyncEnumerable<TSource> source, Func<object, Task> taskBody,
WinFormsControlsTest (1)
TaskDialogSamples.cs (1)
394static async IAsyncEnumerable<int> StreamBackgroundOperationProgressAsync()
xunit.assert (38)
AsyncCollectionAsserts.cs (36)
36 IAsyncEnumerable<T> collection, 49 IAsyncEnumerable<T> collection, 62 IAsyncEnumerable<T> collection, 75 IAsyncEnumerable<T> collection, 88 IAsyncEnumerable<T> collection, 101 IAsyncEnumerable<T> collection, 114 IAsyncEnumerable<T> collection) => 127 IAsyncEnumerable<T> collection, 139 IAsyncEnumerable<T> collection, 149 public static void Distinct<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces | DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties | DynamicallyAccessedMemberTypes.PublicMethods)] T>(IAsyncEnumerable<T> collection) => 160 IAsyncEnumerable<T> collection, 173 IAsyncEnumerable<T> collection) => 186 IAsyncEnumerable<T> collection, 198 IAsyncEnumerable<T> collection, 208 public static void Empty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces | DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties | DynamicallyAccessedMemberTypes.PublicMethods)] T>(IAsyncEnumerable<T> collection) => 221 IAsyncEnumerable<T>? actual) => 237 IAsyncEnumerable<T>? expected, 238 IAsyncEnumerable<T>? actual) => 256 IAsyncEnumerable<T>? actual, 274 IAsyncEnumerable<T>? expected, 275 IAsyncEnumerable<T>? actual, 294 IAsyncEnumerable<T>? actual, 312 IAsyncEnumerable<T>? expected, 313 IAsyncEnumerable<T>? actual, 327 public static void NotEmpty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces | DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties | DynamicallyAccessedMemberTypes.PublicMethods)] T>(IAsyncEnumerable<T> collection) => 340 IAsyncEnumerable<T>? actual) => 356 IAsyncEnumerable<T>? expected, 357 IAsyncEnumerable<T>? actual) => 375 IAsyncEnumerable<T>? actual, 393 IAsyncEnumerable<T>? expected, 394 IAsyncEnumerable<T>? actual, 413 IAsyncEnumerable<T>? actual, 431 IAsyncEnumerable<T>? expected, 432 IAsyncEnumerable<T>? actual, 449 public static T Single<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces | DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties | DynamicallyAccessedMemberTypes.PublicMethods)] T>(IAsyncEnumerable<T> collection) => 465 IAsyncEnumerable<T> collection,
Sdk\AssertHelper.cs (2)
287 internal static IEnumerable<T>? ToEnumerable<T>(IAsyncEnumerable<T>? data) => 293 static IEnumerable<T> ToEnumerableImpl<T>(IAsyncEnumerable<T> data)