gRPC C#
gRPC C#
Namespaces
Grpc.Core.Utils
AsyncStreamExtensions Class
AsyncStreamExtensions Methods
WriteAllAsync Method
WriteAllAsync(T) Method (IServerStreamWriter(T), IEnumerable(T))
WriteAllAsync(T) Method (IClientStreamWriter(T), IEnumerable(T), Boolean)

AsyncStreamExtensions WriteAllAsync T Method (IServerStreamWriter T , IEnumerable T )

Writes all elements from given enumerable to the stream.

Namespace: Grpc.Core.Utils
Assembly: Grpc.Core (in Grpc.Core.dll) Version: 0.7.0.0
Syntax
C#
VB
C++
F#
Copy

    public static Task WriteAllAsync<T>(
    	this IServerStreamWriter<T> streamWriter,
    	IEnumerable<T> elements
    )
    where T : class

    <ExtensionAttribute>
    Public Shared Function WriteAllAsync(Of T As Class) (
    	streamWriter As IServerStreamWriter(Of T),
    	elements As IEnumerable(Of T)
    ) As Task

    public:
    [ExtensionAttribute]
    generic<typename T>
    where T : ref class
    static Task^ WriteAllAsync(
    	IServerStreamWriter<T>^ streamWriter,
    	IEnumerable<T>^ elements
    )

    [<ExtensionAttribute>]
    static member WriteAllAsync :
            streamWriter : IServerStreamWriter<'T> *
            elements : IEnumerable<'T> -> Task  when 'T : not struct

#### Parameters

streamWriter
  Type: Grpc.Core
  IServerStreamWriter
  T

  [Missing <param name="streamWriter"/> documentation for "M:Grpc.Core.Utils.AsyncStreamExtensions.WriteAllAsync``1(Grpc.Core.IServerStreamWriter{``0},System.Collections.Generic.IEnumerable{``0})"]

elements
  Type: System.Collections.Generic
  IEnumerable
  T

  [Missing <param name="elements"/> documentation for "M:Grpc.Core.Utils.AsyncStreamExtensions.WriteAllAsync``1(Grpc.Core.IServerStreamWriter{``0},System.Collections.Generic.IEnumerable{``0})"]

#### Type Parameters

T

  [Missing <typeparam name="T"/> documentation for "M:Grpc.Core.Utils.AsyncStreamExtensions.WriteAllAsync``1(Grpc.Core.IServerStreamWriter{``0},System.Collections.Generic.IEnumerable{``0})"]

#### 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 IServerStreamWriter
T
. 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

#### Reference

AsyncStreamExtensions Class
WriteAllAsync Overload
Grpc.Core.Utils Namespace