public static GlobalIDOwnerCollection DeserializeOdpReportSnapshot(ProcessingContext pc, IChunkFactory originalSnapshotChunks, ProcessingErrorContext errorContext, bool fetchSubreports, bool deserializeGroupTree, IConfiguration configuration, ref OnDemandMetadata odpMetadata, out Report report) { GlobalIDOwnerCollection globalIDOwnerCollection = new GlobalIDOwnerCollection(); report = AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.DeserializeKatmaiReport(pc.ChunkFactory, true, globalIDOwnerCollection); IChunkFactory chunkFactory = originalSnapshotChunks ?? pc.ChunkFactory; if (odpMetadata == null) { odpMetadata = OnDemandProcessingManager.DeserializeOnDemandMetadata(chunkFactory, globalIDOwnerCollection); } if (pc.Parameters != null) { pc.Parameters.StoreLabels(); } if (fetchSubreports) { AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.FetchSubReports(report, pc.ChunkFactory, errorContext, odpMetadata, pc.ReportContext, pc.OnDemandSubReportCallback, 0, true, false, globalIDOwnerCollection, pc.QueryParameters); if (deserializeGroupTree) { OnDemandProcessingManager.DeserializeGroupTree(report, chunkFactory, globalIDOwnerCollection, configuration, ref odpMetadata); } } odpMetadata.GlobalIDOwnerCollection = globalIDOwnerCollection; return(globalIDOwnerCollection); }
public static Report DeserializeReport(bool keepReferences, GlobalIDOwnerCollection globalIDOwnerCollection, IDOwner parentIDOwner, ReportItem parentReportItem, Stream stream) { IntermediateFormatReader intermediateFormatReader = new IntermediateFormatReader(stream, new ProcessingRIFObjectCreator(parentIDOwner, parentReportItem), globalIDOwnerCollection); Report report = (Report)intermediateFormatReader.ReadRIFObject(); report.ReportOrDescendentHasUserSortFilter = report.HasUserSortFilter; if (!keepReferences) { intermediateFormatReader.ClearReferences(); } return(report); }
public static SortFilterEventInfoMap DeserializeSortFilterEventInfo(IChunkFactory originalSnapshotChunks, GlobalIDOwnerCollection globalIDOwnerCollection) { Stream stream = null; SortFilterEventInfoMap sortFilterEventInfoMap = null; try { string text = default(string); stream = originalSnapshotChunks.GetChunk("SortFilterEventInfo", AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.Interactivity, ChunkMode.Open, out text); if (stream != null) { IntermediateFormatReader intermediateFormatReader; do { intermediateFormatReader = new IntermediateFormatReader(stream, new ProcessingRIFObjectCreator(null, null), globalIDOwnerCollection); SortFilterEventInfoMap sortFilterEventInfoMap2 = (SortFilterEventInfoMap)intermediateFormatReader.ReadRIFObject(); Global.Tracer.Assert(null != sortFilterEventInfoMap2, "(null != newInfo)"); if (sortFilterEventInfoMap == null) { sortFilterEventInfoMap = sortFilterEventInfoMap2; } else { sortFilterEventInfoMap.Merge(sortFilterEventInfoMap2); } }while (!intermediateFormatReader.EOS); return(sortFilterEventInfoMap); } return(sortFilterEventInfoMap); } finally { if (stream != null) { stream.Close(); } } }
public static OnDemandMetadata DeserializeOnDemandMetadata(IChunkFactory chunkFactory, GlobalIDOwnerCollection globalIDOwnerCollection) { Stream stream = null; try { string text = default(string); stream = chunkFactory.GetChunk("Metadata", AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.Main, ChunkMode.Open, out text); IntermediateFormatReader intermediateFormatReader = new IntermediateFormatReader(stream, (IRIFObjectCreator)(object)default(GroupTreeRIFObjectCreator), globalIDOwnerCollection); OnDemandMetadata onDemandMetadata = (OnDemandMetadata)intermediateFormatReader.ReadRIFObject(); Global.Tracer.Assert(null != onDemandMetadata, "(null != odpMetadata)"); stream.Close(); stream = null; onDemandMetadata.OdpChunkManager = new OnDemandProcessingManager(); return(onDemandMetadata); } finally { if (stream != null) { stream.Close(); } } }
public static void EnsureGroupTreeStorageSetup(OnDemandMetadata odpMetadata, IChunkFactory chunkFactory, GlobalIDOwnerCollection globalIDOwnerCollection, bool openExisting, int rifCompatVersion, bool prohibitSerializableValues) { if (odpMetadata.GroupTreeScalabilityCache == null) { IStreamHandler streamHandler = OnDemandProcessingManager.BuildChunkStreamHandler("GroupTree", AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.Main, chunkFactory, openExisting); IStorage storage = new RIFAppendOnlyStorage(streamHandler, (IScalabilityObjectCreator)(object)default(GroupTreeRIFObjectCreator), GroupTreeReferenceCreator.Instance, globalIDOwnerCollection, openExisting, rifCompatVersion, prohibitSerializableValues); odpMetadata.GroupTreeScalabilityCache = new GroupTreeScalabilityCache(odpMetadata.GroupTreePartitionManager, storage); } }
public static void DeserializeGroupTree(Report report, IChunkFactory chunkFactory, GlobalIDOwnerCollection globalIDOwnerCollection, IConfiguration configuration, ref OnDemandMetadata odpMetadata) { bool prohibitSerializableValues = configuration != null && configuration.ProhibitSerializableValues; OnDemandProcessingManager.EnsureGroupTreeStorageSetup(odpMetadata, chunkFactory, globalIDOwnerCollection, true, ReportProcessingCompatibilityVersion.GetCompatibilityVersion(configuration), prohibitSerializableValues); IStorage storage = odpMetadata.GroupTreeScalabilityCache.Storage; GroupTreePartition groupTreePartition = (GroupTreePartition)storage.Retrieve(odpMetadata.GroupTreeRootOffset); Global.Tracer.Assert(groupTreePartition.TopLevelScopeInstances[0].GetObjectType() == ObjectType.ReportInstanceReference, "GroupTree root partition did not contain a ReportInstance"); odpMetadata.ReportInstance = (groupTreePartition.TopLevelScopeInstances[0] as IReference <ReportInstance>); odpMetadata.Report = report; odpMetadata.ReportSnapshot.Report = report; }