public DataReplacementPlanViewModel ToSummary() { return(new DataReplacementPlanViewModel( DataBlocks.Select(block => block.ToSummary()), Footnotes.Select(footnote => footnote.ToSummary()), OriginalSubjectId, ReplacementSubjectId )); }
/// <summary> /// Attempt to populate the <see cref="Footnotes"/> property, /// </summary> /// <param name="allFootnotes"></param> public void ResolveFootnotes(IDictionary <string, Note> allFootnotes) { if (allFootnotes is null) { throw new ArgumentNullException(nameof(allFootnotes)); } List <string> currentIds = Footnotes.Select(n => n.Id).ToList(); for (int i = 0; i < currentIds.Count; ++i) { if (allFootnotes.ContainsKey(currentIds[i])) { Footnotes[i] = allFootnotes[currentIds[i]]; } } }