コード例 #1
0
        /// <summary>
        /// Writes an Xml element containing AutoUpdateHref specified
        /// </summary>
        /// <param name="moreInfo"></param>
        protected virtual void WriteHref(AutoUpdateHref moreInfo)
        {
            Debug.Assert(moreInfo != null);

            // start the element
            _writer.WriteStartElement(moreInfo.GetType().Name);

            XmlWriterUtils.WriteAttributes(_writer,
                                           new XmlStringPair("Href", moreInfo.Href)
                                           );

            XmlWriterUtils.WriteCDataElement(_writer, "Text", moreInfo.Text, null);

            // end the element
            _writer.WriteEndElement();
        }
コード例 #2
0
        /// <summary>
        /// Writes an Xml element containing AutoUpdateHref specified
        /// </summary>
        /// <param name="moreInfo"></param>
        private void WriteHref(AutoUpdateHref moreInfo)
        {
            if (moreInfo == null)
            {
                throw new ArgumentNullException("moreInfo");
            }

            // start the element
            _writer.WriteStartElement(moreInfo.GetType().Name);

            XmlWriterUtils.WriteAttributes(_writer,
                                           new XmlStringPair("Href", moreInfo.Href)
                                           );

            XmlWriterUtils.WriteCDataElement(_writer, "Text", moreInfo.Text, null);

            // end the element
            _writer.WriteEndElement();
        }
コード例 #3
0
		/// <summary>
		/// Writes an Xml element containing AutoUpdateHref specified
		/// </summary>
		/// <param name="moreInfo"></param>
		private void WriteHref(AutoUpdateHref moreInfo)
		{
			if (moreInfo == null)
				throw new ArgumentNullException("moreInfo");

			// start the element
			_writer.WriteStartElement(moreInfo.GetType().Name);

			XmlWriterUtils.WriteAttributes(_writer,
				new XmlStringPair("Href", moreInfo.Href)
				);
			
			XmlWriterUtils.WriteCDataElement(_writer, "Text", moreInfo.Text, null);

			// end the element
			_writer.WriteEndElement();
		}