Delete the standalone schema catalog serializers
SerializeSchemaCatalog and DeserializeSchemaCatalog had no consumer outside the snapshot round-trip test. Catalog entries still serialize inside SerializeSnapshot/DeserializeSnapshot through the same per-entry reader and writer, and the round-trip test now checks the catalog through the snapshot. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
900e148d8a
commit
360dd0ae2f
2 changed files with 1 additions and 36 deletions
|
|
@ -141,39 +141,6 @@ public static class CultDocumentMessagePackSerialization
|
|||
return ReadPersistedRecord(ref reader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializes a schema catalog.
|
||||
/// </summary>
|
||||
public static byte[] SerializeSchemaCatalog(CultSchemaCatalogEntry[] catalog)
|
||||
{
|
||||
var buffer = new global::System.Buffers.ArrayBufferWriter<byte>();
|
||||
var writer = new MessagePackWriter(buffer);
|
||||
writer.WriteArrayHeader(catalog.Length);
|
||||
foreach (var entry in catalog)
|
||||
{
|
||||
WriteSchemaCatalogEntry(ref writer, entry);
|
||||
}
|
||||
|
||||
writer.Flush();
|
||||
return buffer.WrittenSpan.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deserializes a schema catalog.
|
||||
/// </summary>
|
||||
public static CultSchemaCatalogEntry[] DeserializeSchemaCatalog(byte[] payload)
|
||||
{
|
||||
var reader = new MessagePackReader(payload);
|
||||
var count = reader.ReadArrayHeader();
|
||||
var catalog = new CultSchemaCatalogEntry[count];
|
||||
for (var index = 0; index < count; index++)
|
||||
{
|
||||
catalog[index] = ReadSchemaCatalogEntry(ref reader);
|
||||
}
|
||||
|
||||
return catalog;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializes a complete persisted store snapshot.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue