コード例 #1
0
        public void Save(Stream stream, bool validate, int minimumManifestVersion)
        {
            if (validate)
            {
                Validate(this);
            }
            string schemaNamespace             = ManifestSchemaUtility.GetSchemaNamespace(Math.Max(minimumManifestVersion, ManifestVersionUtility.GetManifestVersion(this.Metadata)));
            XmlSerializerNamespaces namespaces = new XmlSerializerNamespaces();

            namespaces.Add("", schemaNamespace);
            new XmlSerializer(typeof(Manifest), schemaNamespace).Serialize(stream, this, namespaces);
        }