Пример #1
0
        public void PublishLipidProfile()
        {
            var source = new FileArtifactSource(true);
            var profile = (Profile)source.ReadResourceArtifact(new Uri("http://from.file/TestData/lipid.profile.xml"));

            var publisher = new ProfileTableGenerator(@"c:\temp\publisher", "test page", false);

            var result = File.ReadAllText(@"TestData\publish-header.xml");
            result += publisher.generate(profile, false).ToString(System.Xml.Linq.SaveOptions.DisableFormatting);
            result += File.ReadAllText(@"TestData\publish-footer.xml");

            File.WriteAllText(@"c:\temp\publisher\publisher.html",result);
        }
Пример #2
0
        public void PublishLipidProfileStructures()
        {
            var source  = new FileArtifactSource(true);
            var profile = (Profile)source.ReadResourceArtifact(new Uri("http://from.file/TestData/lipid.profile.xml"));

            var publisher = new StructureGenerator();

            foreach (var structure in profile.Structure)
            {
                var result = File.ReadAllText(@"TestData\publish-header.xml");
                result += publisher.generateStructureTable("bla.html", structure, false, @"c:\temp\publisher", false, profile, "http://nu.nl/publisher.html", "publisher.html")
                          .ToString(System.Xml.Linq.SaveOptions.DisableFormatting);
                result += File.ReadAllText(@"TestData\publish-footer.xml");

                File.WriteAllText(@"c:\temp\publisher\" + structure.Name + ".html", result);
            }
        }
Пример #3
0
        public void PublishLipidProfileStructures()
        {
            var source = new FileArtifactSource(true);
            var profile = (Profile)source.ReadResourceArtifact(new Uri("http://from.file/TestData/lipid.profile.xml"));

            var publisher = new StructureGenerator();

            foreach (var structure in profile.Structure)
            {
                var result = File.ReadAllText(@"TestData\publish-header.xml");
                result += publisher.generateStructureTable("bla.html", structure, false, @"c:\temp\publisher", false, profile, "http://nu.nl/publisher.html", "publisher.html")
                        .ToString(System.Xml.Linq.SaveOptions.DisableFormatting);
                result += File.ReadAllText(@"TestData\publish-footer.xml");

                File.WriteAllText(@"c:\temp\publisher\" + structure.Name + ".html", result);
            }
        }