private Author_2 CreateAuthor() { AssignedAuthor assignedAuthor = new AssignedAuthor(); assignedAuthor.Id.Add(new Identifier("2.16.840.1.113883.4.6", "99999999")); assignedAuthor.Addr.Add(CreateAddress("1002 Healthcare Drive", "Portland", "OR", "99123", "US")); assignedAuthor.Telecom.Add(CreateTelecom("555-555-1002", Ca.Infoway.Messagebuilder.Domainvalue.Basic.TelecommunicationAddressUse.WORKPLACE)); Author_2 author = new Author_2(); author.Time = CreateDate(2005, 02, 29); author.AssignedAuthor = assignedAuthor; return(author); }
private void RenderAuthor(Author_2 author_2) { if (author_2 == null) { return; } IList <Identifier> ids = author_2.AssignedAuthor.Id; Console.WriteLine("Author id: " + (ids.Count == 0 ? "(none)" : ids[0].ToString())); IList <PostalAddress> addrs = author_2.AssignedAuthor.Addr; Console.WriteLine("Author address: " + (addrs.Count == 0 ? "(none)" : RenderAddress(addrs[0]))); }