/// <summary> /// Stores an osmGeo object to disk. /// </summary> /// <param name="osmGeo"></param> private void Store(OsmGeo osmGeo) { XmlOsmStreamTarget target = new XmlOsmStreamTarget(this.StoreFileName(osmGeo)); target.RegisterSource(new OsmGeo[] { osmGeo }.ToOsmStreamSource()); target.Pull(); target.Flush(); }
/// <summary> /// Stores an osmGeo object to disk. /// </summary> /// <param name="osmGeo"></param> private void Store(OsmGeo osmGeo) { using (var targetFile = new FileInfo(this.StoreFileName(osmGeo)).OpenWrite()) { var target = new XmlOsmStreamTarget(targetFile); target.RegisterSource(new OsmGeo[] { osmGeo }.ToOsmStreamSource()); target.Pull(); target.Flush(); } }