Ejemplo n.º 1
0
 public XElement Serialize(string name)
 {
     return(new XElement(UblNames.Cac + name,
                         ID.Serialize(nameof(ID)),
                         AddressTypeCode.Serialize(nameof(AddressTypeCode)),
                         AddressFormatCode.Serialize(nameof(AddressFormatCode)),
                         Postbox.Serialize(nameof(Postbox)),
                         Floor.Serialize(nameof(Floor)),
                         Room.Serialize(nameof(Room)),
                         StreetName.Serialize(nameof(StreetName)),
                         AdditionalStreetName.Serialize(nameof(AdditionalStreetName)),
                         BlockName.Serialize(nameof(BlockName)),
                         BuildingName.Serialize(nameof(BuildingName)),
                         BuildingNumber.Serialize(nameof(BuildingNumber)),
                         InhouseMail.Serialize(nameof(InhouseMail)),
                         Department.Serialize(nameof(Department)),
                         MarkAttention.Serialize(nameof(MarkAttention)),
                         MarkCare.Serialize(nameof(MarkCare)),
                         PlotIdentification.Serialize(nameof(PlotIdentification)),
                         CitySubdivisionName.Serialize(nameof(CitySubdivisionName)),
                         CityName.Serialize(nameof(CityName)),
                         PostalZone.Serialize(nameof(PostalZone)),
                         CountrySubentity.Serialize(nameof(CountrySubentity)),
                         CountrySubentityCode.Serialize(nameof(CountrySubentityCode)),
                         Region.Serialize(nameof(Region)),
                         District.Serialize(nameof(District)),
                         TimezoneOffset.Serialize(nameof(TimezoneOffset)),
                         AddressLines?.Select(line => new XElement(UblNames.Cac + "AddressLine", line.Serialize("Line"))),
                         Country?.Serialize(),
                         LocationCoordinates?.Select(lc => lc.Serialize())
                         ));
 }