Table of Contents

Class SerializationStream

Namespace
Stride.Core.Serialization
Assembly
Stride.Core.dll

Base class for implementation of SerializationStream.

public abstract class SerializationStream
Inheritance
SerializationStream
Derived
Extension Methods

Constructors

SerializationStream()

Initializes a new instance of the SerializationStream class.

protected SerializationStream()

Fields

BufferTLSSize

protected const int BufferTLSSize = 1024

Field Value

int

Properties

Context

The serializer context.

public SerializerContext Context { get; set; }

Property Value

SerializerContext

UnderlyingStream

The Stream from which this serializer reads or to which it writes.

public Stream UnderlyingStream { get; protected set; }

Property Value

Stream

Methods

Flush()

Flushes all recent writes (for better batching). Please note that if only Serialize has been used (no PopTag()), Flush() should be called manually.

public abstract void Flush()

Serialize(ref bool)

Serializes the specified boolean value.

public abstract void Serialize(ref bool value)

Parameters

value bool

The value to serialize

Serialize(ref byte)

Serializes the specified byte value.

public abstract void Serialize(ref byte value)

Parameters

value byte

The value to serialize

Serialize(byte[], int, int)

Serializes the specified byte array.

public abstract void Serialize(byte[] values, int offset, int count)

Parameters

values byte[]

The buffer to serialize.

offset int

The starting offset in the buffer to begin serializing.

count int

The size, in bytes, to serialize.

Serialize(ref char)

Serializes the specified char value.

public abstract void Serialize(ref char value)

Parameters

value char

The value to serialize

Serialize(ref double)

Serializes the specified double value.

public abstract void Serialize(ref double value)

Parameters

value double

The value to serialize

Serialize(ref short)

Serializes the specified short value.

public abstract void Serialize(ref short value)

Parameters

value short

The value to serialize

Serialize(ref int)

Serializes the specified integer value.

public abstract void Serialize(ref int value)

Parameters

value int

The value to serialize

Serialize(ref long)

Serializes the specified long value.

public abstract void Serialize(ref long value)

Parameters

value long

The value to serialize

Serialize(ref sbyte)

Serializes the specified signed byte value.

public abstract void Serialize(ref sbyte value)

Parameters

value sbyte

The value to serialize

Serialize(ref float)

Serializes the specified float value.

public abstract void Serialize(ref float value)

Parameters

value float

The value to serialize

Serialize(Span<byte>)

Serializes the specified memory area.

public abstract void Serialize(Span<byte> memory)

Parameters

memory Span<byte>

The memory area to serialize.

Serialize(ref string)

Serializes the specified string value.

public abstract void Serialize(ref string value)

Parameters

value string

The value to serialize

Serialize(ref ushort)

Serializes the specified ushort value.

public abstract void Serialize(ref ushort value)

Parameters

value ushort

The value to serialize

Serialize(ref uint)

Serializes the specified unsigned integer value.

public abstract void Serialize(ref uint value)

Parameters

value uint

The value to serialize

Serialize(ref ulong)

Serializes the specified unsigned long value.

public abstract void Serialize(ref ulong value)

Parameters

value ulong

The value to serialize