Ejemplo n.º 1
0
        public static PackageMetadataProvider FromPackage(ManifestFolder package)
        {
            var doc      = package.Read(out var title);
            var metadata = new PackageMetadataProvider()
            {
                Title = title
            };

            metadata.AddRange(doc.SelectNodes("/AML/AML/Item")
                              .OfType <System.Xml.XmlElement>()
                              .Select(e => ElementFactory.Local.FromXml(e).AssertItem()));
            return(metadata);
        }
Ejemplo n.º 2
0
        public static PackageMetadataProvider FromScript(InstallScript script)
        {
            var metadata = new PackageMetadataProvider()
            {
                Title = script.Title
            };

            metadata.AddRange(script.Lines
                              .Where(l => l.Type != InstallType.DependencyCheck &&
                                     l.Type != InstallType.Warning)
                              .Select(l => ElementFactory.Local.FromXml(l.Script).AssertItem()));
            return(metadata);
        }