/// <summary> /// Processes the section detail from the external policy, applying it to the GeniusX policy. /// </summary> /// <param name="xiapSection">The xiap section.</param> /// <param name="externalSectionDetail">The external section detail.</param> private void ProcessSectionDetail(Section xiapSection, IUWSectionDetail externalSectionDetail) { SectionDetail sectionDetail = null; SectionDetailVersion sectionDetailVersion = (SectionDetailVersion)this.GetSectionDetailForExternalRef(xiapSection, externalSectionDetail.ExternalReference); if (sectionDetailVersion == null) { // No section detail already exists on the GeniusX policy that matches the External Reference so we create one. sectionDetail = xiapSection.AddNewSectionDetail(externalSectionDetail.SectionDetailTypeCode, false); this.UpdateSectionDetail(sectionDetail, externalSectionDetail); } else { // map the section detail to the correct one from the GeniusX policy, retrieved via the Genius policy external reference sectionDetail = sectionDetailVersion.SectionDetail; } // Get all the external Coverages for this Section Detail, ordered by the Genius Reference var coverages = externalSectionDetail.ICoverages.OrderBy(x => x.ExternalReference); foreach (IUWCoverage externalCoverage in coverages) { this.ProcessCoverage(sectionDetail, externalCoverage); } }