MCPcopy Create free account
hub / github.com/apache/fory / WriteData

Method WriteData

csharp/src/Fory/PrimitiveArraySerializers.cs:59–68  ·  view source on GitHub ↗
(WriteContext context, in sbyte[] value, bool hasGenerics)

Source from the content-addressed store, hash-verified

57 public override sbyte[] DefaultValue => null!;
58
59 public override void WriteData(WriteContext context, in sbyte[] value, bool hasGenerics)
60 {
61 _ = hasGenerics;
62 sbyte[] safe = value ?? [];
63 context.Writer.WriteVarUInt32((uint)safe.Length);
64 for (int i = 0; i < safe.Length; i++)
65 {
66 context.Writer.WriteInt8(safe[i]);
67 }
68 }
69
70 public override sbyte[] ReadData(ReadContext context)
71 {

Callers

nothing calls this directly

Calls 2

WriteVarUInt32Method · 0.80
WriteInt8Method · 0.45

Tested by

no test coverage detected