Class SByteSerializer
Type serializer for the sbyte primitive (signed 8-bit integer, range -128-127). Writes and reads a single signed-byte token without additional framing.
Inherited Members
Namespace: Scylla.Core.Util.Serialization
Assembly: ScyllaCore.dll
Syntax
public sealed class SByteSerializer : TypeSerializerBase<sbyte>, ITypeSerializer<sbyte>, ITypeSerializer
Remarks
Use the shared Instance singleton rather than creating new instances;
SByteSerializer carries no mutable state and is safe to share across threads.
Fields
Instance
Shared, reusable singleton instance of SByteSerializer.
Prefer this over allocating a new instance wherever an SByteSerializer is needed.
Declaration
public static readonly SByteSerializer Instance
Field Value
| Type | Description |
|---|---|
| SByteSerializer |
Methods
Read(IScyllaReader, ISerializationContext)
Reads a signed 8-bit integer value from the reader via ReadSByte().
Declaration
public override sbyte Read(IScyllaReader reader, ISerializationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IScyllaReader | reader | The reader positioned at a signed-byte token. Never |
| ISerializationContext | context | The active serialization context. Never |
Returns
| Type | Description |
|---|---|
| sbyte | The deserialized signed byte value. |
Overrides
Write(sbyte, IScyllaWriter, ISerializationContext)
Writes a signed 8-bit integer value to the output via WriteSByte(sbyte).
Declaration
public override void Write(sbyte value, IScyllaWriter writer, ISerializationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| sbyte | value | The signed byte value to serialize (-128-127). |
| IScyllaWriter | writer | The writer that receives the serialized token. Never |
| ISerializationContext | context | The active serialization context. Never |