public virtual void MoveTo(GDMRecord targetRecord, bool clearDest) { if (clearDest) { targetRecord.Clear(); } var subTags = SubTags; while (subTags.Count > 0) { GDMTag tag = subTags.Extract(0); if (tag.GetTagType() == GEDCOMTagType.CHAN && !clearDest) { tag.Dispose(); } else { tag.ResetOwner(targetRecord); targetRecord.AddTag(tag); } } while (fNotes.Count > 0) { GDMTag tag = fNotes.Extract(0); tag.ResetOwner(targetRecord); targetRecord.Notes.Add((GDMNotes)tag); } while (fMultimediaLinks.Count > 0) { GDMTag tag = fMultimediaLinks.Extract(0); tag.ResetOwner(targetRecord); targetRecord.MultimediaLinks.Add((GDMMultimediaLink)tag); } while (fSourceCitations.Count > 0) { GDMTag tag = fSourceCitations.Extract(0); tag.ResetOwner(targetRecord); targetRecord.SourceCitations.Add((GDMSourceCitation)tag); } while (fUserReferences.Count > 0) { GDMTag tag = fUserReferences.Extract(0); tag.ResetOwner(targetRecord); targetRecord.UserReferences.Add((GDMUserReference)tag); } }
public virtual void MoveTo(GDMRecord targetRecord) { var subTags = SubTags; while (subTags.Count > 0) { GDMTag tag = subTags.Extract(0); if (tag.GetTagType() == GEDCOMTagType.CHAN) { tag.Dispose(); } else { targetRecord.AddTag(tag); } } while (fNotes != null && fNotes.Count > 0) { GDMTag tag = fNotes.Extract(0); targetRecord.Notes.Add((GDMNotes)tag); } while (fMultimediaLinks != null && fMultimediaLinks.Count > 0) { GDMTag tag = fMultimediaLinks.Extract(0); targetRecord.MultimediaLinks.Add((GDMMultimediaLink)tag); } while (fSourceCitations != null && fSourceCitations.Count > 0) { GDMTag tag = fSourceCitations.Extract(0); targetRecord.SourceCitations.Add((GDMSourceCitation)tag); } while (fUserReferences != null && fUserReferences.Count > 0) { GDMTag tag = fUserReferences.Extract(0); targetRecord.UserReferences.Add((GDMUserReference)tag); } }