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

Method ReadData

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

Source from the content-addressed store, hash-verified

137 }
138
139 public override int[] ReadData(ReadContext context)
140 {
141 int byteSize = checked((int)context.Reader.ReadVarUInt32());
142 if ((byteSize & 3) != 0)
143 {
144 throw new InvalidDataException("int32 array byte size mismatch");
145 }
146
147 context.Reader.CheckBound(byteSize);
148 int[] values = new int[byteSize / 4];
149 for (int i = 0; i < values.Length; i++)
150 {
151 values[i] = context.Reader.ReadInt32();
152 }
153
154 return values;
155 }
156}
157
158internal sealed class Int64ArraySerializer : Serializer<long[]>

Callers

nothing calls this directly

Calls 3

ReadVarUInt32Method · 0.80
CheckBoundMethod · 0.80
ReadInt32Method · 0.45

Tested by

no test coverage detected