protected override void SkipSafe(IDecoder decoder) { int length = decoder.DecodeArrayChunk(); while (length != 0) { for (int i = 0; i < length; ++i) { this.Schema.ItemSchema.Serializer.Skip(decoder); } length = decoder.DecodeArrayChunk(); } }
protected override object DeserializeSafe(IDecoder decoder) { var result = new object[0]; int length = decoder.DecodeArrayChunk(); while (length != 0) { int oldValue = result.Length; Array.Resize(ref result, result.Length + length); for (int i = oldValue; i < result.Length; ++i) { result[i] = this.Schema.ItemSchema.Serializer.Deserialize(decoder); } length = decoder.DecodeArrayChunk(); } return(result); }