예제 #1
0
 public IEnumerable <XmlNode> Generate(XCRI.Interfaces.XCRICAP11.ILocation address)
 {
     return(this._GetGeneratedNodes((w) =>
     {
         this.XmlGenerator.Write(w, address);
     }));
 }
예제 #2
0
 protected virtual void WriteXCRI11Address
 (
     System.Xml.XmlWriter xmlWriter,
     XCRI.Interfaces.XCRICAP11.ILocation addressItem
 )
 {
     this.WriteLatitudeLongitude
     (
         xmlWriter,
         addressItem.Latitude,
         addressItem.Longitude
     );
     if (String.IsNullOrEmpty(addressItem.Street) == false)
     {
         xmlWriter.WriteElementString("street", Configuration.Namespaces.XCRICAP11NamespaceUri, addressItem.Street);
     }
     if (String.IsNullOrEmpty(addressItem.Town) == false)
     {
         xmlWriter.WriteElementString("town", Configuration.Namespaces.XCRICAP11NamespaceUri, addressItem.Town);
     }
     if (String.IsNullOrEmpty(addressItem.Postcode) == false)
     {
         xmlWriter.WriteElementString("postcode", Configuration.Namespaces.XCRICAP11NamespaceUri, addressItem.Postcode);
     }
 }
예제 #3
0
 public void Write
 (
     System.Xml.XmlWriter xmlWriter,
     XCRI.Interfaces.XCRICAP11.ILocation address
 )
 {
     if (address == null)
     {
         throw new ArgumentNullException("address");
     }
     if ((address.CompatibleWith & XCRIProfiles.XCRI_v1_1) == 0)
     {
         return;
     }
     this.WriteXCRI11Address(xmlWriter, (XCRI.Interfaces.XCRICAP11.ILocation)address);
 }