public static string ToXml(AutoUpdateManifest manifest, Encoding encoding)
        {
            if (manifest == null)
            {
                throw new ArgumentNullException("manifest");
            }

            if (encoding == null)
            {
                throw new ArgumentNullException("encoding");
            }

            using (MemoryStream stream = new MemoryStream())
            {
                XmlAutoUpdateManifestWriter writer = new XmlAutoUpdateManifestWriter(stream, encoding);

                writer.Write(manifest);

                stream.Close();

                return(encoding.GetString(stream.GetBuffer()));
            }
        }
        /// <summary>
        /// Writes the Test specified to the file specified using the specified encoding
        /// </summary>
        /// <param name="test">The test to write</param>
        /// <param name="path">The file to write to</param>
        /// <param name="encoding">The encoding to write with</param>
        public static void Write(AutoUpdateManifest manifest, string path, Encoding encoding)
        {
            if (manifest == null)
            {
                throw new ArgumentNullException("manifest");
            }

            if (encoding == null)
            {
                throw new ArgumentNullException("encoding");
            }

            // create a new manifest writer
            using (FileStream stream = new FileStream(path, FileMode.Create))
            {
                // create a writer to write the test
                XmlAutoUpdateManifestWriter writer = new XmlAutoUpdateManifestWriter(stream, encoding);

                // write the test
                writer.Write(manifest);

                stream.Close();
            }
        }
		public static string ToXml(AutoUpdateManifest manifest, Encoding encoding)
		{
			if (manifest == null)
				throw new ArgumentNullException("manifest");

			if (encoding == null)
				throw new ArgumentNullException("encoding");

			using (MemoryStream stream = new MemoryStream())
			{
				XmlAutoUpdateManifestWriter writer = new XmlAutoUpdateManifestWriter(stream, encoding);

				writer.Write(manifest);

				stream.Close();

				return encoding.GetString(stream.GetBuffer());
			}
		}
		/// <summary>
		/// Writes the Test specified to the file specified using the specified encoding
		/// </summary>
		/// <param name="test">The test to write</param>
		/// <param name="path">The file to write to</param>
		/// <param name="encoding">The encoding to write with</param>
		public static void Write(AutoUpdateManifest manifest, string path, Encoding encoding)
		{
			if (manifest == null)
				throw new ArgumentNullException("manifest");

			if (encoding == null)
				throw new ArgumentNullException("encoding");
	
			// create a new manifest writer
			using (FileStream stream = new FileStream(path, FileMode.Create))
			{
				// create a writer to write the test
				XmlAutoUpdateManifestWriter writer = new XmlAutoUpdateManifestWriter(stream, encoding);

				// write the test
				writer.Write(manifest);
				
				stream.Close();
			}
		}