AsyncStreamExtensionsToListAsyncT Method |
Reads the entire stream and creates a list containing all the elements read.
Namespace: Grpc.Core.UtilsAssembly: Grpc.Core (in Grpc.Core.dll) Version: 0.6.1.0
Syntaxpublic static Task<List<T>> ToListAsync<T>(
this IAsyncStreamReader<T> streamReader
)
where T : class
<ExtensionAttribute>
Public Shared Function ToListAsync(Of T As Class) (
streamReader As IAsyncStreamReader(Of T)
) As Task(Of List(Of T))
public:
[ExtensionAttribute]
generic<typename T>
where T : ref class
static Task<List<T>^>^ ToListAsync(
IAsyncStreamReader<T>^ streamReader
)
[<ExtensionAttribute>]
static member ToListAsync :
streamReader : IAsyncStreamReader<'T> -> Task<List<'T>> when 'T : not struct
Parameters
- streamReader
- Type: Grpc.CoreIAsyncStreamReaderT
[Missing <param name="streamReader"/> documentation for "M:Grpc.Core.Utils.AsyncStreamExtensions.ToListAsync``1(Grpc.Core.IAsyncStreamReader{``0})"]
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:Grpc.Core.Utils.AsyncStreamExtensions.ToListAsync``1(Grpc.Core.IAsyncStreamReader{``0})"]
Return Value
Type:
TaskListTUsage 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