Geometry: name the cache formatter on each CultRecordRef member
The MessagePack source generator cannot resolve CultRecordRef<T> on its own and emitted a broken formatter reference; MessagePackKnownFormatter on the open generic did not change that. An explicit MessagePackFormatter per member is the same formatter the cache resolver uses, so the wire stays a key string. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e35b009204
commit
9ea134aca9
1 changed files with 3 additions and 4 deletions
|
|
@ -7,10 +7,6 @@ using GameCult.Caching;
|
|||
using MessagePack;
|
||||
using static GameCult.Geometry.CultGeometryDocuments;
|
||||
|
||||
// The generator emits a resolver for these [MessagePackObject] documents; without this it would try to
|
||||
// generate a formatter for the CultRecordRef<T> reference members instead of using the cache's.
|
||||
[assembly: MessagePackKnownFormatter(typeof(CultRecordRefFormatter<>))]
|
||||
|
||||
namespace GameCult.Geometry
|
||||
{
|
||||
/// <summary>
|
||||
|
|
@ -157,6 +153,7 @@ namespace GameCult.Geometry
|
|||
public string RequestId { get; set; } = string.Empty;
|
||||
|
||||
[Key(1)]
|
||||
[MessagePackFormatter(typeof(CultRecordRefFormatter<CultGeometryDomainDocument>))]
|
||||
public CultRecordRef<CultGeometryDomainDocument> DomainKey { get; set; }
|
||||
|
||||
[Key(2)]
|
||||
|
|
@ -231,6 +228,7 @@ namespace GameCult.Geometry
|
|||
public string CutId { get; set; } = string.Empty;
|
||||
|
||||
[Key(1)]
|
||||
[MessagePackFormatter(typeof(CultRecordRefFormatter<CultGeometryBuildRequest>))]
|
||||
public CultRecordRef<CultGeometryBuildRequest> RequestKey { get; set; }
|
||||
|
||||
[Key(2)]
|
||||
|
|
@ -315,6 +313,7 @@ namespace GameCult.Geometry
|
|||
public string ChunkId { get; set; } = string.Empty;
|
||||
|
||||
[Key(1)]
|
||||
[MessagePackFormatter(typeof(CultRecordRefFormatter<CultGeometrySelectedCutManifest>))]
|
||||
public CultRecordRef<CultGeometrySelectedCutManifest> CutKey { get; set; }
|
||||
|
||||
[Key(2)]
|
||||
|
|
|
|||
Loading…
Reference in a new issue