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

Method WriteData

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

Source from the content-addressed store, hash-verified

200 public override ushort[] DefaultValue => null!;
201
202 public override void WriteData(WriteContext context, in ushort[] value, bool hasGenerics)
203 {
204 _ = hasGenerics;
205 ushort[] safe = value ?? [];
206 context.Writer.WriteVarUInt32((uint)(safe.Length * 2));
207 for (int i = 0; i < safe.Length; i++)
208 {
209 context.Writer.WriteUInt16(safe[i]);
210 }
211 }
212
213 public override ushort[] ReadData(ReadContext context)
214 {

Callers

nothing calls this directly

Calls 2

WriteVarUInt32Method · 0.80
WriteUInt16Method · 0.80

Tested by

no test coverage detected