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

Method ReadData

csharp/src/Fory/PrimitiveArraySerializers.cs:176–192  ·  view source on GitHub ↗
(ReadContext context)

Source from the content-addressed store, hash-verified

174 }
175
176 public override long[] ReadData(ReadContext context)
177 {
178 int byteSize = checked((int)context.Reader.ReadVarUInt32());
179 if ((byteSize & 7) != 0)
180 {
181 throw new InvalidDataException("int64 array byte size mismatch");
182 }
183
184 context.Reader.CheckBound(byteSize);
185 long[] values = new long[byteSize / 8];
186 for (int i = 0; i < values.Length; i++)
187 {
188 values[i] = context.Reader.ReadInt64();
189 }
190
191 return values;
192 }
193}
194
195internal sealed class UInt16ArraySerializer : Serializer<ushort[]>

Callers

nothing calls this directly

Calls 3

ReadVarUInt32Method · 0.80
CheckBoundMethod · 0.80
ReadInt64Method · 0.45

Tested by

no test coverage detected