Beispiel #1
0
        private void rewriteElementXmlPackage(PackageVO pkg)
        {
            if (pkg.childPackageList.Count > 0)
            {
                foreach (PackageVO p in pkg.childPackageList)
                {
                    rewriteElementXmlPackage(p);
                }
            }

            if (pkg.elements.Count > 0)
            {
                foreach (ElementVO elem in pkg.elements)
                {
                    ElementXmlWriter.outputElementXmlFile(elem);
                }
            }
        }
Beispiel #2
0
        private static void outputPackage(PackageVO pkg, int depth, StreamWriter sw)
        {
            sw.Write(indent(depth) + "<package ");
            sw.Write("guid=\"" + pkg.guid + "\" ");
            sw.Write("name=\"" + escapeXML(pkg.name) + "\" ");
            sw.Write("isControlled=\"" + pkg.isControlled + "\" ");
            if (pkg.stereoType != null)
            {
                sw.Write("stereoType=\"" + pkg.stereoType + "\" ");
            }
            sw.Write("changed=\"" + pkg.changed + "\" ");
            sw.WriteLine(" >");

            if (pkg.elements != null && pkg.elements.Count > 0)
            {
                foreach (ElementVO elem in pkg.elements)
                {
                    ElementXmlWriter.writeElementXml(elem, depth + 1, sw);
                }
            }

            if (pkg.diagrams != null && pkg.diagrams.Count > 0)
            {
                foreach (DiagramVO dia in pkg.diagrams)
                {
                    DiagramXmlWriter.outputDiagramXml(dia, depth + 1, sw);
                }
            }

            if (pkg.childPackageList.Count > 0)
            {
                foreach (PackageVO p in pkg.childPackageList)
                {
                    outputPackage(p, depth + 1, sw);
                }
            }

            sw.WriteLine(indent(depth) + "</package>");
        }