Edit

Share via


Writer.Create Method

Definition

Overloads

Create(Byte[], SerializerSession)

Creates a writer which writes to the specified destination.

Create(MemoryStream, SerializerSession)

Creates a writer which writes to the specified destination.

Create(Memory<Byte>, SerializerSession)

Creates a writer which writes to the specified destination.

Create(Span<Byte>, SerializerSession)

Creates a writer which writes to the specified destination.

Create(Stream, SerializerSession, Int32)

Creates a writer which writes to the specified destination.

Create<TBufferWriter>(TBufferWriter, SerializerSession)

Creates a writer which writes to the specified destination.

Create(Byte[], SerializerSession)

Creates a writer which writes to the specified destination.

public static Orleans.Serialization.Buffers.Writer<Orleans.Serialization.Buffers.Adaptors.SpanBufferWriter> Create (byte[] output, Orleans.Serialization.Session.SerializerSession session);
static member Create : byte[] * Orleans.Serialization.Session.SerializerSession -> Orleans.Serialization.Buffers.Writer<Orleans.Serialization.Buffers.Adaptors.SpanBufferWriter>
Public Shared Function Create (output As Byte(), session As SerializerSession) As Writer(Of SpanBufferWriter)

Parameters

output
Byte[]

The destination.

session
SerializerSession

The session.

Returns

A new Writer<TBufferWriter>.

Applies to

Create(MemoryStream, SerializerSession)

Creates a writer which writes to the specified destination.

public static Orleans.Serialization.Buffers.Writer<Orleans.Serialization.Buffers.Adaptors.MemoryStreamBufferWriter> Create (System.IO.MemoryStream destination, Orleans.Serialization.Session.SerializerSession session);
static member Create : System.IO.MemoryStream * Orleans.Serialization.Session.SerializerSession -> Orleans.Serialization.Buffers.Writer<Orleans.Serialization.Buffers.Adaptors.MemoryStreamBufferWriter>
Public Shared Function Create (destination As MemoryStream, session As SerializerSession) As Writer(Of MemoryStreamBufferWriter)

Parameters

destination
MemoryStream

The destination.

session
SerializerSession

The session.

Returns

A new Writer<TBufferWriter>.

Applies to

Create(Memory<Byte>, SerializerSession)

Creates a writer which writes to the specified destination.

public static Orleans.Serialization.Buffers.Writer<Orleans.Serialization.Buffers.Adaptors.MemoryBufferWriter> Create (Memory<byte> output, Orleans.Serialization.Session.SerializerSession session);
static member Create : Memory<byte> * Orleans.Serialization.Session.SerializerSession -> Orleans.Serialization.Buffers.Writer<Orleans.Serialization.Buffers.Adaptors.MemoryBufferWriter>
Public Shared Function Create (output As Memory(Of Byte), session As SerializerSession) As Writer(Of MemoryBufferWriter)

Parameters

output
Memory<Byte>

The destination.

session
SerializerSession

The session.

Returns

A new Writer<TBufferWriter>.

Applies to

Create(Span<Byte>, SerializerSession)

Creates a writer which writes to the specified destination.

public static Orleans.Serialization.Buffers.Writer<Orleans.Serialization.Buffers.Adaptors.SpanBufferWriter> Create (Span<byte> output, Orleans.Serialization.Session.SerializerSession session);
static member Create : Span<byte> * Orleans.Serialization.Session.SerializerSession -> Orleans.Serialization.Buffers.Writer<Orleans.Serialization.Buffers.Adaptors.SpanBufferWriter>
Public Shared Function Create (output As Span(Of Byte), session As SerializerSession) As Writer(Of SpanBufferWriter)

Parameters

output
Span<Byte>

The destination.

session
SerializerSession

The session.

Returns

A new Writer<TBufferWriter>.

Applies to

Create(Stream, SerializerSession, Int32)

Creates a writer which writes to the specified destination.

public static Orleans.Serialization.Buffers.Writer<Orleans.Serialization.Buffers.Adaptors.ArrayStreamBufferWriter> Create (System.IO.Stream destination, Orleans.Serialization.Session.SerializerSession session, int sizeHint = 0);
static member Create : System.IO.Stream * Orleans.Serialization.Session.SerializerSession * int -> Orleans.Serialization.Buffers.Writer<Orleans.Serialization.Buffers.Adaptors.ArrayStreamBufferWriter>
Public Shared Function Create (destination As Stream, session As SerializerSession, Optional sizeHint As Integer = 0) As Writer(Of ArrayStreamBufferWriter)

Parameters

destination
Stream

The destination.

session
SerializerSession

The session.

sizeHint
Int32

The size hint.

Returns

A new Writer<TBufferWriter>.

Applies to

Create<TBufferWriter>(TBufferWriter, SerializerSession)

Creates a writer which writes to the specified destination.

public static Orleans.Serialization.Buffers.Writer<TBufferWriter> Create<TBufferWriter> (TBufferWriter destination, Orleans.Serialization.Session.SerializerSession session) where TBufferWriter : System.Buffers.IBufferWriter<byte>;
static member Create : 'BufferWriter * Orleans.Serialization.Session.SerializerSession -> Orleans.Serialization.Buffers.Writer<'BufferWriter (requires 'BufferWriter :> System.Buffers.IBufferWriter<byte>)> (requires 'BufferWriter :> System.Buffers.IBufferWriter<byte>)
Public Shared Function Create(Of TBufferWriter As IBufferWriter(Of Byte)) (destination As TBufferWriter, session As SerializerSession) As Writer(Of TBufferWriter)

Type Parameters

TBufferWriter

The buffer writer output type.

Parameters

destination
TBufferWriter

The destination.

session
SerializerSession

The session.

Returns

A new Writer<TBufferWriter>.

Applies to