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

Method WriteData

csharp/src/Fory/PrimitiveCollectionSerializers.cs:136–144  ·  view source on GitHub ↗
(WriteContext context, in List<int> value, bool hasGenerics)

Source from the content-addressed store, hash-verified

134 public override List<int> DefaultValue => null!;
135
136 public override void WriteData(WriteContext context, in List<int> value, bool hasGenerics)
137 {
138 List<int> list = value ?? [];
139 PrimitiveCollectionHeader.WriteListHeader(context, list.Count, hasGenerics, TypeId.VarInt32, false);
140 for (int i = 0; i < list.Count; i++)
141 {
142 context.Writer.WriteVarInt32(list[i]);
143 }
144 }
145
146 public override List<int> ReadData(ReadContext context)
147 {

Callers

nothing calls this directly

Calls 2

WriteListHeaderMethod · 0.80
WriteVarInt32Method · 0.80

Tested by

no test coverage detected