void EmitRead_CreateInstance(SerializerCodeGen g, Local valueArr, Local[] lengths, Operand optionalOutOldFirstDimLength, Local outResult) { using (g.ctx.StartDebugBlockAuto(this)) { if (AppendToCollection) { g.If(valueArr.AsOperand != null); { g.AssignAdd(lengths[0], optionalOutOldFirstDimLength.Assign(valueArr.AsOperand.Invoke("GetLength", 0))); } g.End(); } g.Assign(outResult, g.ExpressionFactory.NewArray(_itemType, lengths.Select(l => (Operand)l.AsOperand).ToArray())); g.Reader.NoteObject(outResult); if (AppendToCollection) { g.If(valueArr.AsOperand != null && optionalOutOldFirstDimLength > 0); { g.Invoke(typeof(Array), "Copy", valueArr, outResult, valueArr.AsOperand.Property("Length")); } g.End(); } } }