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

Method WriteData

csharp/src/Fory/PrimitiveSerializers.cs:254–260  ·  view source on GitHub ↗
(WriteContext context, in byte[] value, bool hasGenerics)

Source from the content-addressed store, hash-verified

252 public override byte[] DefaultValue => null!;
253
254 public override void WriteData(WriteContext context, in byte[] value, bool hasGenerics)
255 {
256 _ = hasGenerics;
257 byte[] safe = value ?? [];
258 context.Writer.WriteVarUInt32((uint)safe.Length);
259 context.Writer.WriteBytes(safe);
260 }
261
262 public override byte[] ReadData(ReadContext context)
263 {

Callers

nothing calls this directly

Calls 2

WriteVarUInt32Method · 0.80
WriteBytesMethod · 0.45

Tested by

no test coverage detected