/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="XmlScrNote"/> class based on /// the given Scripture note. /// </summary> /// <param name="ann">The Scripture annotation.</param> /// <param name="wsDefault">The default (analysis) writing system.</param> /// <param name="lgwsf">The writing system factory.</param> /// ------------------------------------------------------------------------------------ public XmlScrNote(IScrScriptureNote ann, int wsDefault, ILgWritingSystemFactory lgwsf) : this() { m_wsDefault = wsDefault; m_lgwsf = lgwsf; ResolutionStatus = ann.ResolutionStatus; m_typeName = ann.AnnotationTypeRA.Name.get_String(WritingSystemServices.FallbackUserWs(ann.Cache)).Text; m_guidType = ann.AnnotationTypeRA.Guid; SetNoteType(ann); m_startRef = ann.BeginRef; if (ann.BeginRef != ann.EndRef) { m_endRef = ann.EndRef; } if (ann.BeginObjectRA != null) { m_guidBegObj = ann.BeginObjectRA.Guid; } if (ann.BeginObjectRA != ann.EndObjectRA && ann.EndObjectRA != null) { m_guidEndObj = ann.EndObjectRA.Guid; } BeginOffset = ann.BeginOffset; EndOffset = ann.EndOffset; m_createdDate = ann.DateCreated; m_modifiedDate = ann.DateModified; m_resolvedDate = ann.DateResolved; Quote = XmlNotePara.GetParagraphList(ann.QuoteOA, m_wsDefault, m_lgwsf); Discussion = XmlNotePara.GetParagraphList(ann.DiscussionOA, m_wsDefault, m_lgwsf); Suggestion = XmlNotePara.GetParagraphList(ann.RecommendationOA, m_wsDefault, m_lgwsf); Resolution = XmlNotePara.GetParagraphList(ann.ResolutionOA, m_wsDefault, m_lgwsf); Categories = XmlNoteCategory.GetCategoryList(ann, m_lgwsf); Responses = XmlNoteResponse.GetResponsesList(ann, m_wsDefault, m_lgwsf); }