public static void ParseHelper(BinaryReader br, object[] format, ref object[] loadedArgs, ref int currentArgIndex, VariableArrayCountDelegate vaCount, StringLengthDelegate lastStringLength) { object[] objArray4 = format; for (int num5 = 0; num5 < objArray4.Length; num5++) { object obj1 = objArray4[num5]; if (obj1 is string) { Stream stream1 = br.BaseStream; stream1.Position += Utilities.GetByteArrLengthFromHexStr((string)obj1); } else if (obj1 is Type) { Type type1 = (Type)obj1; if (type1.IsEnum) { type1 = Enum.GetUnderlyingType(type1); } switch (type1.FullName) { case "System.Int16": { loadedArgs[currentArgIndex] = br.ReadInt16(); break; } case "System.UInt16": { loadedArgs[currentArgIndex] = br.ReadUInt16(); break; } case "System.UInt32": { loadedArgs[currentArgIndex] = br.ReadUInt32(); break; } case "System.UInt64": { loadedArgs[currentArgIndex] = br.ReadUInt64(); break; } case "System.Byte": { loadedArgs[currentArgIndex] = br.ReadByte(); break; } case "System.Char": { loadedArgs[currentArgIndex] = br.ReadChar(); break; } case "System.Single": { loadedArgs[currentArgIndex] = br.ReadSingle(); break; } case "System.Double": { loadedArgs[currentArgIndex] = br.ReadDouble(); break; } case "MB.WinEIDrive.Excel.ExcelShortString": { loadedArgs[currentArgIndex] = new ExcelShortString(br); break; } case "MB.WinEIDrive.Excel.ExcelLongString": { loadedArgs[currentArgIndex] = new ExcelLongString(br); break; } case "MB.WinEIDrive.Excel.ExcelStringWithoutLength": { loadedArgs[currentArgIndex] = new ExcelStringWithoutLength(br, lastStringLength(loadedArgs)); break; } case "MB.WinEIDrive.Excel.ExcelLongStrings": { int num1 = vaCount(loadedArgs, null, (int)br.BaseStream.Length); loadedArgs[currentArgIndex] = new ExcelLongStrings(br, num1, 0); break; } case "MB.WinEIDrive.Excel.CellRecordHeader": { loadedArgs[currentArgIndex] = new CellRecordHeader(br); break; } case "MB.WinEIDrive.Excel.SheetIndexes": { loadedArgs[currentArgIndex] = new SheetIndexes(br); break; } default: { throw new Exception("Internal error: unsupported type in format."); } } currentArgIndex += 1; } else { if (!(obj1 is object[])) { throw new Exception("Internal error: wrong format in descriptor."); } object[] objArray1 = (object[])obj1; int num2 = vaCount(loadedArgs, objArray1, (int)br.BaseStream.Length); object[] objArray2 = new object[objArray1.Length * num2]; int num3 = 0; for (int num4 = 0; num4 < num2; num4++) { XLSDescriptors.ParseHelper(br, objArray1, ref objArray2, ref num3, vaCount, lastStringLength); } object[] objArray3 = new object[num3]; Array.Copy(objArray2, objArray3, num3); loadedArgs[currentArgIndex] = objArray3; currentArgIndex += 1; } } }
public ContinueRecord(ExcelLongStrings excelStrings) : base(ContinueRecord.staticDescriptor) { base.ExcelStrings = excelStrings; object[] objArray1 = new object[] { excelStrings }; base.InitializeDelayed(objArray1); }