/// <summary> /// Builds a nested dictionary of all elements and which Segments they are combined with for 1 report, specified by <paramref name="rh"/>. /// </summary> /// <param name="rh">The <see cref="ReportHeader"/> whose element/segment combinations should be loaded.</param> /// <returns></returns> private InstanceReport.ElementSegmentCombinations BuildInUseElementSegmentCombinationsForCurrentReport(ReportHeader rh) { if (rh.ReportType == ReportHeaderType.Sheet || rh.ReportType == ReportHeaderType.Notes) { if (!this.uniqueReportElementSegmentCombos.ContainsKey(rh.XmlFileName) || this.uniqueReportElementSegmentCombos == null || this.uniqueReportElementSegmentCombos.Count == 0) { InstanceReport report = InstanceReport.LoadXml(Path.Combine(this.currentReportDirectory, rh.XmlFileName)); InstanceReport.ElementSegmentCombinations elementSegmentCombinations = report.GetUniqueInUseElementSegmentCombinations(); this.uniqueReportElementSegmentCombos[rh.XmlFileName] = elementSegmentCombinations; } } if (this.uniqueReportElementSegmentCombos.ContainsKey(rh.XmlFileName)) { return(uniqueReportElementSegmentCombos[rh.XmlFileName]); } return(null); }