/// <summary>
        /// Writes the application data reference data to the specified XmlWriter.
        /// </summary>
        ///
        /// <param name="writer">
        /// The XmlWriter to write the application data reference data to.
        /// </param>
        ///
        /// <exception cref="ArgumentNullException">
        /// If <paramref name="writer"/> is <b>null</b>.
        /// </exception>
        ///
        /// <exception cref="ThingSerializationException">
        /// If <see cref="Name"/> is <b>null</b>.
        /// </exception>
        ///
        public override void WriteXml(XmlWriter writer)
        {
            Validator.ThrowIfWriterNull(writer);
            Validator.ThrowSerializationIfNull(_name, Resources.ApplicationDataReferenceNameNotSet);

            writer.WriteStartElement("application-data-reference");

            writer.WriteElementString("name", _name);

            XmlWriterHelper.WriteOptString(writer, "render-filename", _renderFileName);

            XmlWriterHelper.WriteOptUrl(writer, "public-url", _publicUrl);

            XmlWriterHelper.WriteOptUrl(writer, "configuration-url", _configurationUrl);

            XmlWriterHelper.WriteOptUrl(writer, "application-data-url", _applicationDataUrl);

            writer.WriteEndElement();
        }