public static int FindBoomark(AspNetCore.ReportingServices.OnDemandReportRendering.Report report, string bookmarkId, ref string uniqueName, ref int lastPageCollected, ref bool reportDone) { int result = 0; string text = null; Stream chunk = report.GetChunk(AspNetCore.ReportingServices.OnDemandReportRendering.Report.ChunkTypes.Interactivity, "Bookmarks"); if (chunk != null && chunk.Length > 0) { chunk.Position = 0L; BinaryReader binaryReader = new BinaryReader(chunk); byte b = binaryReader.ReadByte(); while (true) { switch (b) { case 0: break; case 2: lastPageCollected = binaryReader.ReadInt32(); reportDone = binaryReader.ReadBoolean(); goto IL_0090; default: goto IL_0090; } text = binaryReader.ReadString(); if (SPBProcessing.CompareWithOrdinalComparison(bookmarkId, text, false) == 0) { uniqueName = binaryReader.ReadString(); return(binaryReader.ReadInt32()); } binaryReader.ReadString(); binaryReader.ReadInt32(); binaryReader.ReadByte(); b = binaryReader.ReadByte(); } } goto IL_0090; IL_0090: return(result); }
private static Stream GetInteractivityChunck(AspNetCore.ReportingServices.OnDemandReportRendering.Report report, string chunkName, int page, out int lastPage) { lastPage = 0; Stream stream = null; bool flag = false; stream = ((page != 1) ? report.GetChunk(AspNetCore.ReportingServices.OnDemandReportRendering.Report.ChunkTypes.Interactivity, chunkName) : report.GetOrCreateChunk(AspNetCore.ReportingServices.OnDemandReportRendering.Report.ChunkTypes.Interactivity, chunkName, out flag)); if (stream == null) { return(null); } if (!flag) { long num = stream.Length - 9; if (num > 0) { stream.Seek(num, SeekOrigin.Begin); BinaryReader binaryReader = new BinaryReader(stream); binaryReader.ReadByte(); num = 9 + binaryReader.ReadInt64(); stream.Seek(-num, SeekOrigin.End); binaryReader.ReadByte(); lastPage = binaryReader.ReadInt32(); if (binaryReader.ReadBoolean()) { return(null); } stream.Seek(-num, SeekOrigin.End); } else { stream.Seek(0L, SeekOrigin.Begin); } } return(stream); }