public static GDMNotes AddNote(this IGDMStructWithNotes _struct, GDMNoteRecord noteRec) { GDMNotes note = null; if (noteRec != null) { note = new GDMNotes(); note.XRef = noteRec.XRef; _struct.Notes.Add(note); } return(note); }
public static GDMNotes AddNote(this IGDMStructWithNotes _struct, GDMNoteRecord noteRec) { GDMNotes note = null; if (noteRec != null) { note = new GDMNotes((GDMObject)_struct); note.Value = noteRec; _struct.Notes.Add(note); } return(note); }
public static GDMNotes FindNotes(this IGDMStructWithNotes _struct, GDMNoteRecord noteRec) { if (noteRec != null && _struct.HasNotes) { int num = _struct.Notes.Count; for (int i = 0; i < num; i++) { var notes = _struct.Notes[i]; if (notes.XRef == noteRec.XRef) { return(notes); } } } return(null); }
private static void CheckTagWithNotes(GDMTree tree, GEDCOMFormat format, IGDMStructWithNotes tag) { for (int i = tag.Notes.Count - 1; i >= 0; i--) { GDMNotes note = tag.Notes[i]; if (!note.IsPointer) { TransformNote(tree, note); } else { if (note.Value == null) { tag.Notes.DeleteAt(i); } } } }
private void CheckTagWithNotes(IGDMStructWithNotes tag) { for (int i = tag.Notes.Count - 1; i >= 0; i--) { GDMNotes note = tag.Notes[i]; if (!note.IsPointer) { TransformNote(note); } else { var noteRec = fTree.GetPtrValue <GDMNoteRecord>(note); if (noteRec == null) { tag.Notes.DeleteAt(i); } } } }