public static FormElementInfo[] ReadFormElements(BinaryReader r) { return(r.ReadBlocksWithIdAndOffest(delegate(BinaryReader reader, int id, int length) { int num = reader.ReadInt32(); FormElementInfo formElementInfo = (num != 65539) ? ((FormElementInfo)FormControlInfo.ReadWithoutDataType(r, length - 4)) : ((FormElementInfo)FormMenuInfo.ReadWithoutDataType(r, length - 4)); formElementInfo.id = id; formElementInfo.DataType = num; return formElementInfo; })); }
public static FormElementInfo[] ReadFormElements(BinaryReader r) { return(r.ReadBlocksWithIdAndOffest((reader, id, length) => { var dataType = reader.ReadInt32(); FormElementInfo elem; if (dataType == 65539) { elem = FormMenuInfo.ReadWithoutDataType(r, length - 4); } else { elem = FormControlInfo.ReadWithoutDataType(r, length - 4); } elem.id = id; elem.DataType = dataType; return elem; })); }