public List <CallCreditDataAddressLinks> GetAddressLinks(CT_outputapplicantAddresslinks addresslink)
        {
            var AddressLinks = new List <CallCreditDataAddressLinks>();

            TryRead(() => {
                foreach (var AdL in addresslink.links)
                {
                    var addlink = new CallCreditDataAddressLinks {
                        AddressLinkNocs = new List <CallCreditDataAddressLinksNocs>()
                    };

                    var addlinks                           = AdL;
                    addlink.CreationDate                   = TryReadDate(() => addlinks.creationdate, "Address Link creation date", false);
                    addlink.LastConfDate                   = TryReadDate(() => addlinks.lastconfdate, "Address Link most recent confirmation date", false);
                    TryRead(() => addlink.From             = (int)addlinks.from, "Address ID for the from address", false);
                    TryRead(() => addlink.To               = (int)addlinks.to, "Address ID for the to address", false);
                    TryRead(() => addlink.SupplierName     = addlinks.supplierdetails.suppliername, "Address Link Supplier name", false);
                    TryRead(() => addlink.SupplierTypeCode = addlinks.supplierdetails.suppliertypecode, "Address Link Supplier type code", false);
                    TryRead(() => {
                        foreach (var AddLinkNoc in addlinks.notice)
                        {
                            var addlinknoc = new CallCreditDataAddressLinksNocs();

                            var addlinknotice = AddLinkNoc;
                            TryRead(() => addlinknoc.NoticeType = addlinknotice.type, "Notice Type (Correction or Dispute)", false);
                            TryRead(() => addlinknoc.RefNum     = addlinknotice.refnum, "Notice Type (Notice Reference Number)", false);
                            addlinknoc.DateRaised                          = TryReadDate(() => addlinknotice.dateraised, "Date that the Notice was raised)", false);
                            TryRead(() => addlinknoc.Text                  = addlinknotice.text, "Text for Notice of Correction", false);
                            TryRead(() => addlinknoc.NameDetails           = addlinknotice.name, "Name details as provided on the Notice of Correction)", false);
                            TryRead(() => addlinknoc.CurrentAddress        = Convert.ToBoolean(addlinknotice.address.current), "current address check", false);
                            TryRead(() => addlinknoc.UnDeclaredAddressType = (int)addlinknotice.address.undeclaredaddresstype, "type of undeclared address", false);
                            TryRead(() => addlinknoc.AddressValue          = addlinknotice.address.Value, "Address value related to notice against address link", false);
                            addlink.AddressLinkNocs.Add(addlinknoc);
                        }
                    }, "Address link Notices");

                    AddressLinks.Add(addlink);
                }
            }, "Address links");

            return(AddressLinks);
        }
        public List <CallCreditDataLinkAddresses> GetLinkAddresses(CT_outputapplicantAddresslinks addresslink)
        {
            var LinkAddresses = new List <CallCreditDataLinkAddresses>();

            TryRead(() => {
                foreach (var LinkAd in addresslink.addresses)
                {
                    var linkaddresses = new CallCreditDataLinkAddresses();

                    var linkadd = LinkAd;
                    TryRead(() => linkaddresses.AddressID             = (int)linkadd.addressid, "Address id within an Address Link", false);
                    TryRead(() => linkaddresses.Declared              = Convert.ToBoolean(linkadd.declared), "Address declared on the application check", false);
                    TryRead(() => linkaddresses.NavLinkID             = linkadd.navlinkid, "Identifier for Address Link navigation", false);
                    TryRead(() => linkaddresses.CurrentAddress        = Convert.ToBoolean(linkadd.current), "Applicant's current address check", false);
                    TryRead(() => linkaddresses.UnDeclaredAddressType = (int)linkadd.undeclaredaddresstype, "Type of undeclared address", false);
                    TryRead(() => linkaddresses.AddressValue          = linkadd.Value, "Address value held against an address link", false);
                    LinkAddresses.Add(linkaddresses);
                }
            }, "Link Addresses");

            return(LinkAddresses);
        }