Click or drag to resize
AsyncStreamExtensionsForEachAsyncT Method
Reads the entire stream and executes an async action for each element.

Namespace: Grpc.Core.Utils
Assembly: Grpc.Core (in Grpc.Core.dll) Version: 0.7.0.0
Syntax
public static Task ForEachAsync<T>(
	this IAsyncStreamReader<T> streamReader,
	Func<T, Task> asyncAction
)
where T : class

Parameters

streamReader
Type: Grpc.CoreIAsyncStreamReaderT

[Missing <param name="streamReader"/> documentation for "M:Grpc.Core.Utils.AsyncStreamExtensions.ForEachAsync``1(Grpc.Core.IAsyncStreamReader{``0},System.Func{``0,System.Threading.Tasks.Task})"]

asyncAction
Type: SystemFuncT, Task

[Missing <param name="asyncAction"/> documentation for "M:Grpc.Core.Utils.AsyncStreamExtensions.ForEachAsync``1(Grpc.Core.IAsyncStreamReader{``0},System.Func{``0,System.Threading.Tasks.Task})"]

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "M:Grpc.Core.Utils.AsyncStreamExtensions.ForEachAsync``1(Grpc.Core.IAsyncStreamReader{``0},System.Func{``0,System.Threading.Tasks.Task})"]

Return Value

Type: Task

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IAsyncStreamReaderT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also