public void PositionRecords(List <RecordBase> sheetRecords) { // Take a copy to loop over, so we can update the real one // without concurrency issues List <HeaderFooterRecord> hfRecordsToIterate = new List <HeaderFooterRecord>(_sviewHeaderFooters); Dictionary <String, HeaderFooterRecord> hfGuidMap = new Dictionary <String, HeaderFooterRecord>(); foreach (HeaderFooterRecord hf in hfRecordsToIterate) { string key = HexDump.ToHex(hf.Guid); if (hfGuidMap.ContainsKey(key)) { hfGuidMap[key] = hf; } else { hfGuidMap.Add(HexDump.ToHex(hf.Guid), hf); } } // loop through HeaderFooterRecord records having not-empty GUID and match them with // CustomViewSettingsRecordAggregate blocks having UserSViewBegin with the same GUID foreach (HeaderFooterRecord hf in hfRecordsToIterate) { foreach (RecordBase rb in sheetRecords) { if (rb is CustomViewSettingsRecordAggregate) { CustomViewSettingsRecordAggregate cv = (CustomViewSettingsRecordAggregate)rb; cv.VisitContainedRecords(new CustomRecordVisitor1(cv, hf, _sviewHeaderFooters, hfGuidMap)); } } } }
public CustomRecordVisitor1(CustomViewSettingsRecordAggregate cv, HeaderFooterRecord hf, List <HeaderFooterRecord> sviewHeaderFooter, Dictionary <String, HeaderFooterRecord> hfGuidMap) { this._cv = cv; this._hf = hf; this._sviewHeaderFooters = sviewHeaderFooter; _hfGuidMap = hfGuidMap; }
public void PositionRecords(List <RecordBase> sheetRecords) { // Take a copy to loop over, so we can update the real one // without concurrency issues List <HeaderFooterRecord> hfRecordsToIterate = new List <HeaderFooterRecord>(_sviewHeaderFooters); // loop through HeaderFooterRecord records having not-empty GUID and match them with // CustomViewSettingsRecordAggregate blocks having UserSViewBegin with the same GUID foreach (HeaderFooterRecord hf in hfRecordsToIterate) { foreach (RecordBase rb in sheetRecords) { if (rb is CustomViewSettingsRecordAggregate) { CustomViewSettingsRecordAggregate cv = (CustomViewSettingsRecordAggregate)rb; cv.VisitContainedRecords(new CustomRecordVisitor1(cv, hf, _sviewHeaderFooters)); } } } }
public CustomRecordVisitor1(CustomViewSettingsRecordAggregate cv, HeaderFooterRecord hf, List<HeaderFooterRecord> sviewHeaderFooter, Dictionary<String, HeaderFooterRecord> hfGuidMap) { this._cv = cv; this._hf = hf; this._sviewHeaderFooters = sviewHeaderFooter; _hfGuidMap = hfGuidMap; }
public CustomRecordVisitor1(CustomViewSettingsRecordAggregate cv, HeaderFooterRecord hf, List<HeaderFooterRecord> sviewHeaderFooter) { this._cv = cv; this._hf = hf; this._sviewHeaderFooters = sviewHeaderFooter; }
public CustomRecordVisitor1(CustomViewSettingsRecordAggregate cv, HeaderFooterRecord hf, List <HeaderFooterRecord> sviewHeaderFooter) { this._cv = cv; this._hf = hf; this._sviewHeaderFooters = sviewHeaderFooter; }