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