public void Save(XmlWriter xml) { xml.WriteAttributeString("Type", _type.ToString()); if (_pubDate.HasValue) { xml.WriteAttributeString("PubDate", _pubDate.Value.ToString("s")); } xml.WriteString(_location); }
private FlatResultImageInfo getImageInfoFlat() { var flatResult = new FlatResultImageInfo(); flatResult.Image_Location = ImageLocation; flatResult.Image_From = ImageLocationType.ToString(); if (ImageLocationType == CVClientCommon.LocationType.Local) { var fileInfo = new FileInfo(ImageLocation); flatResult.Image_BaseName = fileInfo.Name; } else if (ImageLocationType == CVClientCommon.LocationType.Uri) { Uri fileUri = new Uri(ImageLocation); flatResult.Image_BaseName = fileUri.Segments.Last(); } return(flatResult); }