private bool LoadGeneratedReportItemDefinition() { AspNetCore.ReportingServices.ReportIntermediateFormat.ReportSnapshot reportSnapshot = base.RenderingContext.OdpContext.OdpMetadata.ReportSnapshot; string chunkName = default(string); if (!reportSnapshot.TryGetGeneratedReportItemChunkName(this.GetGeneratedDefinitionChunkKey(), out chunkName)) { return(false); } IChunkFactory chunkFactory = base.RenderingContext.OdpContext.ChunkFactory; string text = default(string); Stream chunk = chunkFactory.GetChunk(chunkName, AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.GeneratedReportItems, ChunkMode.Open, out text); if (chunk == null) { return(false); } using (chunk) { IntermediateFormatReader intermediateFormatReader = new IntermediateFormatReader(chunk, new ProcessingRIFObjectCreator((AspNetCore.ReportingServices.ReportIntermediateFormat.IDOwner)base.m_reportItemDef.ParentInstancePath, base.m_reportItemDef.Parent)); AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem reportItem = (AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem)intermediateFormatReader.ReadRIFObject(); Global.Tracer.Assert(!intermediateFormatReader.HasReferences, "!reader.HasReferences"); reportItem.GlobalID = -this.CriDef.GlobalID; if (reportItem.StyleClass != null) { reportItem.StyleClass.InitializeForCRIGeneratedReportItem(); } reportItem.Visibility = base.m_reportItemDef.Visibility; AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType = reportItem.ObjectType; if (objectType == AspNetCore.ReportingServices.ReportProcessing.ObjectType.Image) { Image image = new Image(this.ParentScope, base.ParentDefinitionPath, this.m_indexIntoParentCollectionDef, (AspNetCore.ReportingServices.ReportIntermediateFormat.Image)reportItem, base.RenderingContext); image.CriOwner = this; image.CriGenerationPhase = CriGenerationPhases.None; this.m_generatedReportItem = image; } else { Global.Tracer.Assert(false, "Unexpected CRI generated report item type: " + reportItem.ObjectType); } } return(true); }
private bool LoadGeneratedReportItemInstance() { Global.Tracer.Assert(this.m_generatedReportItem != null && this.m_generatedReportItem.Instance != null, "m_generatedReportItem != null && m_generatedReportItem.Instance != null"); if (this.m_dynamicWidth == null && this.m_dynamicHeight == null) { AspNetCore.ReportingServices.ReportIntermediateFormat.ReportSnapshot reportSnapshot = base.RenderingContext.OdpContext.OdpMetadata.ReportSnapshot; string text = default(string); if (this.CriDef.RepeatWith != null) { if (!reportSnapshot.TryGetImageChunkName(this.GetGeneratedInstanceChunkKey(), out text)) { return(false); } ((ImageInstance)this.m_generatedReportItem.Instance).StreamName = text; return(true); } if (!reportSnapshot.TryGetGeneratedReportItemChunkName(this.GetGeneratedInstanceChunkKey(), out text)) { return(false); } IChunkFactory chunkFactory = base.RenderingContext.OdpContext.ChunkFactory; string text2 = default(string); Stream chunk = chunkFactory.GetChunk(text, AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.GeneratedReportItems, ChunkMode.Open, out text2); if (chunk == null) { return(false); } using (chunk) { ROMInstanceObjectCreator rOMInstanceObjectCreator = new ROMInstanceObjectCreator(this.m_generatedReportItem.Instance); IntermediateFormatReader intermediateFormatReader = new IntermediateFormatReader(chunk, rOMInstanceObjectCreator, rOMInstanceObjectCreator); IPersistable persistable = intermediateFormatReader.ReadRIFObject(); Global.Tracer.Assert(persistable is ReportItemInstance, "reportItemInstance is ReportItemInstance"); Global.Tracer.Assert(!intermediateFormatReader.HasReferences, "!reader.HasReferences"); } return(true); } return(false); }