Ejemplo n.º 1
0
        public void WriteManifest(XmlWriter writer, bool packageFragment)
        {
            Log.StartJob(Util.WRITER_CreatingManifest);

            if (!packageFragment)
            {
                //Start dotnetnuke element
                WriteManifestStartElement(writer);
            }

            //Start package Element
            WritePackageStartElement(writer);

            //write Script Component
            if (Scripts.Count > 0)
            {
                var scriptWriter = new ScriptComponentWriter(BasePath, Scripts, Package);
                scriptWriter.WriteManifest(writer);
            }

            //write Clean Up Files Component
            if (CleanUpFiles.Count > 0)
            {
                var cleanupFileWriter = new CleanupComponentWriter(BasePath, CleanUpFiles);
                cleanupFileWriter.WriteManifest(writer);
            }

            //Write the Custom Component
            WriteManifestComponent(writer);

            //Write Assemblies Component
            if (Assemblies.Count > 0)
            {
                var assemblyWriter = new AssemblyComponentWriter(AssemblyPath, Assemblies, Package);
                assemblyWriter.WriteManifest(writer);
            }

            //Write AppCode Files Component
            if (AppCodeFiles.Count > 0)
            {
                var fileWriter = new FileComponentWriter(AppCodePath, AppCodeFiles, Package);
                fileWriter.WriteManifest(writer);
            }

            //write Files Component
            if (Files.Count > 0)
            {
                WriteFilesToManifest(writer);
            }

            //write ResourceFiles Component
            if (Resources.Count > 0)
            {
                var fileWriter = new ResourceFileComponentWriter(BasePath, Resources, Package);
                fileWriter.WriteManifest(writer);
            }

            //Close Package
            WritePackageEndElement(writer);

            if (!packageFragment)
            {
                //Close Dotnetnuke Element
                WriteManifestEndElement(writer);
            }
            Log.EndJob(Util.WRITER_CreatedManifest);
        }
Ejemplo n.º 2
0
        public void WriteManifest(XmlWriter writer, bool packageFragment)
        {
            Log.StartJob(Util.WRITER_CreatingManifest);

            if (!packageFragment)
            {
				//Start dotnetnuke element
                WriteManifestStartElement(writer);
            }
			
            //Start package Element
            WritePackageStartElement(writer);

            //write Script Component
            if (Scripts.Count > 0)
            {
                var scriptWriter = new ScriptComponentWriter(BasePath, Scripts, Package);
                scriptWriter.WriteManifest(writer);
            }
			
            //write Clean Up Files Component
            if (CleanUpFiles.Count > 0)
            {
                var cleanupFileWriter = new CleanupComponentWriter(BasePath, CleanUpFiles);
                cleanupFileWriter.WriteManifest(writer);
            }
			
            //Write the Custom Component
            WriteManifestComponent(writer);

            //Write Assemblies Component
            if (Assemblies.Count > 0)
            {
                var assemblyWriter = new AssemblyComponentWriter(AssemblyPath, Assemblies, Package);
                assemblyWriter.WriteManifest(writer);
            }
			
            //Write AppCode Files Component
            if (AppCodeFiles.Count > 0)
            {
                var fileWriter = new FileComponentWriter(AppCodePath, AppCodeFiles, Package);
                fileWriter.WriteManifest(writer);
            }
			
            //write Files Component
            if (Files.Count > 0)
            {
                WriteFilesToManifest(writer);
            }
			
            //write ResourceFiles Component
            if (Resources.Count > 0)
            {
                var fileWriter = new ResourceFileComponentWriter(BasePath, Resources, Package);
                fileWriter.WriteManifest(writer);
            }
			
            //Close Package
            WritePackageEndElement(writer);

            if (!packageFragment)
            {
				//Close Dotnetnuke Element
                WriteManifestEndElement(writer);
            }
            Log.EndJob(Util.WRITER_CreatedManifest);
        }