예제 #1
0
        public void Constructor_Url_SetsUrl()
        {
            Uri url = new Uri("http://spatial.litesolutions.net");

            GpxLink target = new GpxLink(url);

            Assert.Same(url, target.Url);
        }
예제 #2
0
        /// <summary>
        /// Writes the given link to the output stream
        /// </summary>
        /// <param name="waypoint">The link to be written</param>
        private void WriteLink(GpxLink link)
        {
            _xmlWriter.WriteStartElement("link");
            _xmlWriter.WriteAttributeString("href", link.Url.OriginalString);

            if (link.Text != null)
                _xmlWriter.WriteElementString("text", link.Text);
            if (link.Type != null)
                _xmlWriter.WriteElementString("type", link.Type);

            _xmlWriter.WriteEndElement();
        }