using System.Xml.Linq; using CRIF.ACTion.Common; using CRIF.ACTion.Common.Builders; using CRIF.ACTion.Configuration; namespace CRIF.ACTion.Loan { public class AppNotesSectionBuilder : CrifRequestSection { public AppNotesSectionBuilder(XNamespace sectionNamespace, CrifSettings settings) : base(sectionNamespace, "appNotes", settings) { } public void AddAppNote(string appNoteContent) { var appNote = new XElement(CrifNamespaces.App + "appNote", new XAttribute(CrifNamespaces.App + "noteEntry", BuilderUtils.FormatCrifData(appNoteContent)), new XAttribute(CrifNamespaces.App + "noteTypeDisplayName", "Application Note"), new XAttribute(CrifNamespaces.App + "noteTypeCategoryDisplayName", "Application Note")); var noteType = new XElement(CrifNamespaces.App + "noteType", new XAttribute(CrifNamespaces.Common + "CD", 1)); var noteTypeCategory = new XElement(CrifNamespaces.App + "noteTypeCategory", new XAttribute(CrifNamespaces.Common + "lookupType", "NoteTypeCategory"), new XAttribute(CrifNamespaces.Common + "CD", 1)); appNote.Add(noteType, noteTypeCategory); AddContent(appNote); } } }