public static Manifest ReadFrom(Stream stream, IPropertyProvider propertyProvider, bool validateSchema) { XDocument document = !ReferenceEquals(propertyProvider, NullPropertyProvider.Instance) ? XDocument.Parse(Preprocessor.Process(stream, propertyProvider, true)) : XmlUtility.LoadSafe(stream, true); string schemaNamespace = GetSchemaNamespace(document); foreach (XElement local1 in document.Descendants()) { local1.Name = XName.Get(local1.Name.LocalName, schemaNamespace); } CheckSchemaVersion(document); if (validateSchema) { ValidateManifestSchema(document, schemaNamespace); } Manifest manifest = ManifestReader.ReadManifest(document); Validate(manifest); return(manifest); }
private static XElement GetXml(IPackageFile file, IProjectSystem projectSystem) { var content = Preprocessor.Process(file, projectSystem); return(XElement.Parse(content, LoadOptions.PreserveWhitespace)); }
private static XElement GetXml(IPackageFile file, IProjectSystem projectSystem) { var content = Preprocessor.Process(file, projectSystem); return(XElement.Parse(content)); }