rename serialization methods and add BinaryObjectStreamReader for interop

This commit is contained in:
LukeFZ
2024-08-14 01:00:32 +02:00
parent 2d3b186b4d
commit 6c59434984
11 changed files with 191 additions and 28 deletions

View File

@@ -25,13 +25,13 @@ public struct Pointer<T>(ulong value = 0) : IReadable, IEquatable<Pointer<T>> wh
public readonly T Read(ref SpanReader reader, in StructVersion version)
{
reader.Offset = (int)PointerValue;
return reader.ReadObject<T>(version);
return reader.ReadVersionedObject<T>(version);
}
public readonly ImmutableArray<T> ReadArray(ref SpanReader reader, long count, in StructVersion version)
{
reader.Offset = (int)PointerValue;
return reader.ReadObjectArray<T>(count, version);
return reader.ReadVersionedObjectArray<T>(count, version);
}
public static implicit operator Pointer<T>(ulong value) => new(value);