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