コード例 #1
0
        private void SaveTopic()
        {
            //build topic
            var root = CreateDeveloperOrientationElement();

            root.Add(new XElement(xmlns + "introduction",
                                  new XElement(xmlns + "para",
                                               new XText(
                                                   string.Format(
                                                       "This section contains information about the assemblies used in the {0} application.",
                                                       appName)))));
            var elems =
                new List <XElement>(CatalogExplorerFactory.CatalogExplorer().Applications[appName].Assemblies.Count);

            foreach (var assy in resources)
            {
                assemblyTopics.Add(new AssemblyTopic(appName, assy, topicRelativePath));
                elems.Add(new XElement(xmlns + "para", new XElement(xmlns + "topic", new XText(CleanAndPrep(appName + ".Assemblies." + assy)))));
            }

            var thisSection = new XElement(xmlns + "inThisSection", new XText("This application contains the following assemblies:"), elems.ToArray());

            root.Add(thisSection);
            if (doc.Root != null)
            {
                doc.Root.Add(root);
            }
        }
コード例 #2
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            Cursor = Cursors.WaitCursor;

            if (lbApps.Items.Count > 0)
            {
                lbApps.Items.Clear();
            }

            try
            {
                lblStatus.Text = "Connecting...";
                foreach (Application app in CatalogExplorerFactory.CatalogExplorer().Applications)
                {
                    lbApps.Items.Add(app.Name);
                }
                lblStatus.Text = "Select the application(s) you wish to document.";
            }
            catch (Exception ex)
            {
                HandleException("Connect", ex);
                MessageBox.Show(string.Format("A {0} occurred connecting to the BizTalk Database: \r\n{1}", ex.GetType(),
                                              ex.Message), "Connection Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                bce.Dispose();
                Cursor = Cursors.Arrow;
            }
        }
コード例 #3
0
        void SaveTopic()
        {
            //var bce = CatalogExplorerFactory.CatalogExplorer();
            //bce.ConnectionString = CatalogExplorerFactory.CatalogExplorer().ConnectionString;
            var transform = CatalogExplorerFactory.CatalogExplorer().Applications[appName].Transforms[transformName];

            sb.Append(
                "<?xml version=\"1.0\" encoding=\"utf-8\"?><topic id=\"" + id + "\" revisionNumber=\"1\">");
            root = CreateDeveloperXmlReference();

            var intro   = new XElement(xmlns + "introduction", new XElement(xmlns + "para", new XText(string.IsNullOrEmpty(transform.Description) ? "No description was found for the schema." : transform.Description)));
            var section = new XElement(xmlns + "section", new XElement(xmlns + "title", new XText("Transform Properties")),
                                       new XElement(xmlns + "content",
                                                    new XElement(xmlns + "table",
                                                                 new XElement(xmlns + "tableHeader",
                                                                              new XElement(xmlns + "row",
                                                                                           new XElement(xmlns + "entry", new XText("Property")),
                                                                                           new XElement(xmlns + "entry", new XText("Value")))),
                                                                 new XElement(xmlns + "row",
                                                                              new XElement(xmlns + "entry", new XText("Application")),
                                                                              new XElement(xmlns + "entry", new XElement(xmlns + "token", new XText(CleanAndPrep(transform.Application.Name))))),
                                                                 new XElement(xmlns + "row",
                                                                              new XElement(xmlns + "entry", new XText("Assembly Qualified Name")),
                                                                              new XElement(xmlns + "entry", new XElement(xmlns + "token", new XText(CleanAndPrep(appName + ".Assemblies." + transform.AssemblyQualifiedName))))),
                                                                 new XElement(xmlns + "row",
                                                                              new XElement(xmlns + "entry", new XText("Source Schema")),
                                                                              new XElement(xmlns + "entry", new XElement(xmlns + "token", new XText(appName + ".Schemas." + transform.SourceSchema.FullName)))),
                                                                 new XElement(xmlns + "row",
                                                                              new XElement(xmlns + "entry", new XText("Target Schema")),
                                                                              new XElement(xmlns + "entry", new XElement(xmlns + "token", new XText(appName + ".Schemas." + transform.TargetSchema.FullName))))
                                                                 )));

            var content = new XElement(xmlns + "codeExample", new XElement(xmlns + "code", new XAttribute("language", "xml"), new XText(transform.XmlContent)));

            root.Add(intro, section, content);
            sb.Append(root.ToString(SaveOptions.None));
            sb.Append("</topic>");
        }
コード例 #4
0
        void SaveTopic()
        {
            //var bce = CatalogExplorerFactory.CatalogExplorer();
            try
            {
                //bce.ConnectionString = CatalogExplorerFactory.CatalogExplorer().ConnectionString;
                var root = CreateDeveloperConceptualElement();
                var rp   = CatalogExplorerFactory.CatalogExplorer().Applications[appName].ReceivePorts[rpName];

                var intro = new XElement(xmlns + "introduction", new XElement(xmlns + "para", string.IsNullOrEmpty(rp.Description) ? new XText("No description was available for this receive location.") : new XText(rp.Description)));

                var section = new XElement(xmlns + "section", new XElement(xmlns + "title", new XText(rp.Name + " Properties")),
                                           new XElement(xmlns + "content",
                                                        new XElement(xmlns + "table",
                                                                     new XElement(xmlns + "tableHeader",
                                                                                  new XElement(xmlns + "row",
                                                                                               new XElement(xmlns + "entry", new XText("Property"),
                                                                                                            new XElement(xmlns + "entry", new XText("Value"))))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Application")),
                                                                                  new XElement(xmlns + "entry", new XElement(xmlns + "token", new XText(CleanAndPrep(rp.Application.Name))))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Authentication")),
                                                                                  new XElement(xmlns + "entry", new XText(rp.Authentication.ToString()))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Custom Data    ")),
                                                                                  new XElement(xmlns + "entry", new XText(string.IsNullOrEmpty(rp.CustomData) ? "N/A" : rp.CustomData))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Primary Receive Location")),
                                                                                  new XElement(xmlns + "entry", new XElement(xmlns + "token", new XText(appName + ".ReceiveLocations." + rp.PrimaryReceiveLocation.Name)))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Is Two Way?")),
                                                                                  new XElement(xmlns + "entry", new XText(rp.IsTwoWay.ToString()))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Route Failed Message?")),
                                                                                  new XElement(xmlns + "entry", new XText(rp.RouteFailedMessage.ToString()))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Send Pipeline")),
                                                                                  GetPipelineEntry(rp.SendPipeline)),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Tracking")),
                                                                                  new XElement(xmlns + "entry", new XText(rp.Tracking.ToString()))))));
                root.Add(intro, section);
                var inTrans  = new List <XElement>();
                var outTrans = new List <XElement>();

                if (null != rp.InboundTransforms)
                {
                    foreach (Transform map in rp.InboundTransforms)
                    {
                        inTrans.Add(new XElement(xmlns + "listItem", new XElement(xmlns + "token", new XText(CleanAndPrep(map.Application.Name) + ".Transforms." + map.FullName))));
                    }
                }

                if (null != rp.OutboundTransforms)
                {
                    foreach (Transform map in rp.OutboundTransforms)
                    {
                        outTrans.Add(new XElement(xmlns + "listItem", new XElement(xmlns + "token", new XText(CleanAndPrep(map.Application.Name) + ".Transforms." + map.FullName))));
                    }
                }

                if (inTrans.Count > 0)
                {
                    var mapsIn = new XElement(xmlns + "section",
                                              new XElement(xmlns + "title", new XText("Inbound Transforms")),
                                              new XElement(xmlns + "content",
                                                           new XElement(xmlns + "para",
                                                                        new XText(
                                                                            "The following inbound transforms are associated with this receive port:")),
                                                           new XElement(xmlns + "list", inTrans.ToArray())));
                    root.Add(mapsIn);
                }
                if (outTrans.Count > 0)
                {
                    var mapsOut = new XElement(xmlns + "section",
                                               new XElement(xmlns + "title", new XText("Outbound Transforms")),
                                               new XElement(xmlns + "content",
                                                            new XElement(xmlns + "para",
                                                                         new XText(
                                                                             "The following outbound transforms are associated with this receive port:")),
                                                            new XElement(xmlns + "list", inTrans.ToArray())));
                    root.Add(mapsOut);
                }

                if (doc.Root != null)
                {
                    doc.Root.Add(root);
                }
            }
            catch (Exception ex)
            {
                HandleException("ReceivePortTopic.DoWork", ex);
            }
        }
コード例 #5
0
        private void SaveTopic()
        {
            //var bce = CatalogExplorerFactory.CatalogExplorer();
            try
            {
                //bce.ConnectionString = CatalogExplorerFactory.CatalogExplorer().ConnectionString;
                //get the object
                var assy = CatalogExplorerFactory.CatalogExplorer().Assemblies[assyName];
                tokenId = CleanAndPrep(appName + ".Assemblies." + assy.DisplayName);
                TokenFile.GetTokenFile().AddTopicToken(tokenId, id);
                displayName = assy.Name;
                var root = CreateDeveloperConceptualElement();

                //build the document structure

                #region assembly info

                root.Add(new XElement(xmlns + "section",
                                      new XElement(xmlns + "title", new XText("Assembly Information")),
                                      new XElement(xmlns + "content",
                                                   new XElement(xmlns + "table",
                                                                new XElement(xmlns + "tableHeader",
                                                                             new XElement(xmlns + "row",
                                                                                          new XElement(xmlns + "entry",
                                                                                                       new XText("Property")),
                                                                                          new XElement(xmlns + "entry",
                                                                                                       new XText("Value")))),
                                                                new XElement(xmlns + "row",
                                                                             new XElement(xmlns + "entry", new XText("Name")),
                                                                             new XElement(xmlns + "entry", new XText(assy.Name))),
                                                                new XElement(xmlns + "row",
                                                                             new XElement(xmlns + "entry", new XText("Display Name")),
                                                                             new XElement(xmlns + "entry",
                                                                                          new XText(assy.DisplayName))),
                                                                new XElement(xmlns + "row",
                                                                             new XElement(xmlns + "entry", new XText("Version")),
                                                                             new XElement(xmlns + "entry", new XText(assy.Version))),
                                                                new XElement(xmlns + "row",
                                                                             new XElement(xmlns + "entry",
                                                                                          new XText("Public Key Token")),
                                                                             new XElement(xmlns + "entry", assy.PublicKeyToken))))
                                      ));

                #endregion

                var elems = new List <XElement>();

                #region list orchestrations

                if (assy.Orchestrations.Count > 0)
                {
                    foreach (BtsOrchestration orchestration in assy.Orchestrations)
                    {
                        elems.Add(new XElement(xmlns + "listItem", new XElement(xmlns + "token", CleanAndPrep(appName + ".Orchestrations." + orchestration.FullName))));
                    }
                    var list = new XElement(xmlns + "list", new XAttribute("class", "bullet"), elems.ToArray());

                    root.Add(new XElement(xmlns + "section",
                                          new XElement(xmlns + "title", new XText("Orchestrations")),
                                          new XElement(xmlns + "content",
                                                       new XElement(xmlns + "para",
                                                                    new XText(
                                                                        "This assembly contains the following orchestrations:")),
                                                       list)));
                }

                #endregion

                #region list pipelines

                if (assy.Pipelines != null && assy.Pipelines.Count > 0)
                {
                    elems.Clear();
                    foreach (Pipeline pipeline in assy.Pipelines)
                    {
                        elems.Add(new XElement(xmlns + "listItem",
                                               new XElement(xmlns + "token", CleanAndPrep(pipeline.AssemblyQualifiedName))));
                    }
                    var list = new XElement(xmlns + "list", new XAttribute("class", "bullet"), elems.ToArray());
                    root.Add(AddListSection("Pipelines", "This assembly defines the following pipelines:", list));
                }

                #endregion

                #region port types

                //if (assy.PortTypes != null && assy.PortTypes.Count > 0)
                //{
                //    XElement list = new XElement(xmlns + "list", new XAttribute("class", "bullet"));
                //    foreach (PortType portType in assy.PortTypes)
                //    {
                //        list.Add(new XElement(xmlns + "listItem",
                //                              new XElement(xmlns + "token", CleanAndPrep(appName + ".PortTypes." + portType.FullName))));
                //    }
                //    root.Add(AddListSection("Port Types", "This assembly defines the following port types:", list));
                //}

                #endregion

                #region list schemas

                if (assy.Schemas != null && assy.Schemas.Count > 0)
                {
                    elems.Clear();
                    foreach (Schema schema in assy.Schemas)
                    {
                        elems.Add(new XElement(xmlns + "listItem", new XElement(xmlns + "token", CleanAndPrep(appName + ".Schemas." + schema.FullName))));
                    }

                    var list = new XElement(xmlns + "list", new XAttribute("class", "bullet"), elems.ToArray());
                    root.Add(AddListSection("Schemas", "This assembly contains the following schemas:", list));
                }

                #endregion list schemas

                #region list transforms

                if (assy.Transforms != null && assy.Transforms.Count > 0)
                {
                    foreach (Transform trans in assy.Transforms)
                    {
                        elems.Add(new XElement(xmlns + "listItem", new XElement(xmlns + "token", CleanAndPrep(appName + ".Transforms." + trans.FullName))));
                    }

                    var list = new XElement(xmlns + "list", new XAttribute("class", "bullet"), elems.ToArray());
                    root.Add(AddListSection("Transforms", "This assembly contains the following maps:", list));
                }

                #endregion

                if (doc.Root != null)
                {
                    doc.Root.Add(root);
                }
            }
            catch (Exception ex)
            {
                HandleException("BtsAssemblyTopic.DoWork", ex);
            }
        }
コード例 #6
0
        void SaveTopic()
        {
            //var bce = CatalogExplorerFactory.CatalogExplorer();
            //bce.ConnectionString = CatalogExplorerFactory.CatalogExplorer().ConnectionString;
            var sp = CatalogExplorerFactory.CatalogExplorer().Applications[appName].SendPorts[sendPortName];

            root = CreateDeveloperConceptualElement();

            var intro = new XElement(xmlns + "introduction",
                                     new XElement(xmlns + "para", new XText(string.IsNullOrEmpty(sp.Description)? "No description was available for this send port." : sp.Description)));
            var section = new XElement(xmlns + "sections", new XElement("section", new XElement(xmlns + "title", new XText("Send Port Properties")),
                                                                        new XElement(xmlns + "content",
                                                                                     new XElement(xmlns + "table",
                                                                                                  new XElement(xmlns + "tableHeader",
                                                                                                               new XElement(xmlns + "row",
                                                                                                                            new XElement(xmlns + "entry", new XText("Property")),
                                                                                                                            new XElement(xmlns + "entry", new XText("Value")))),
                                                                                                  new XElement(xmlns + "row",
                                                                                                               new XElement(xmlns + "entry", new XText("Custom Data")),
                                                                                                               new XElement(xmlns + "entry", new XText(string.IsNullOrEmpty(sp.CustomData) ? "N/A":  sp.CustomData))),
                                                                                                  new XElement(xmlns + "row",
                                                                                                               new XElement(xmlns + "entry", new XText("Filter")),
                                                                                                               new XElement(xmlns + "entry", new XText(string.IsNullOrEmpty(sp.Filter) ? "N/A" : sp.Filter))),
                                                                                                  new XElement(xmlns + "row",
                                                                                                               new XElement(xmlns + "entry", new XText("Dynamic")),
                                                                                                               new XElement(xmlns + "entry", new XText(sp.IsDynamic.ToString()))),
                                                                                                  new XElement(xmlns + "row",
                                                                                                               new XElement(xmlns + "entry", new XText("TwoWay")),
                                                                                                               new XElement(xmlns + "entry", new XText(sp.IsTwoWay.ToString()))),
                                                                                                  new XElement(xmlns + "row",
                                                                                                               new XElement(xmlns + "entry", new XText("Ordered Delivery")),
                                                                                                               new XElement(xmlns + "entry", new XText(sp.OrderedDelivery.ToString()))),
                                                                                                  new XElement(xmlns + "row",
                                                                                                               new XElement(xmlns + "entry", new XText("Priority")),
                                                                                                               new XElement(xmlns + "entry", new XText(sp.Priority.ToString()))),
                                                                                                  new XElement(xmlns + "row",
                                                                                                               new XElement(xmlns + "entry", new XText("Receive Pipeline"),
                                                                                                                            GetPipelineEntry(sp.ReceivePipeline))),
                                                                                                  new XElement(xmlns + "row",
                                                                                                               new XElement(xmlns + "entry", new XText("Receive Pipeline Data")),
                                                                                                               new XElement(xmlns + "entry", new XText(string.IsNullOrEmpty(sp.ReceivePipelineData) ? "N/A": sp.ReceivePipelineData))),
                                                                                                  new XElement(xmlns + "row",
                                                                                                               new XElement(xmlns + "entry", new XText("Send Pipeline")),
                                                                                                               GetPipelineEntry(sp.SendPipeline)),
                                                                                                  new XElement(xmlns + "row",
                                                                                                               new XElement(xmlns + "entry", new XText("Status")),
                                                                                                               new XElement(xmlns + "entry", new XText(sp.Status.ToString()))),
                                                                                                  new XElement(xmlns + "row",
                                                                                                               new XElement(xmlns + "entry", new XText("Stop Sending On Failure")),
                                                                                                               new XElement(xmlns + "entry", new XText(sp.StopSendingOnFailure.ToString()))),
                                                                                                  new XElement(xmlns + "row",
                                                                                                               new XElement(xmlns + "entry", new XText("Tracking")),
                                                                                                               new XElement(xmlns + "entry", new XText(sp.Tracking.ToString()))),
                                                                                                  new XElement(xmlns + "row",
                                                                                                               new XElement(xmlns + "entry", new XText("Inbound Transforms")),
                                                                                                               GetTransformEntry(sp.InboundTransforms)),
                                                                                                  new XElement(xmlns + "row",
                                                                                                               new XElement(xmlns + "entry", new XText("Outbound Transforms")),
                                                                                                               GetTransformEntry(sp.OutboundTransforms))
                                                                                                  ))),
                                       GetTransportTypeElement(sp.PrimaryTransport, "Primary Transport Properties"),
                                       GetTransportTypeElement(sp.SecondaryTransport, "Secondary Transport Properties"));

            root.Add(intro, section);
            if (doc.Root != null)
            {
                doc.Root.Add(root);
            }
        }
コード例 #7
0
        void SaveTopic()
        {
            //var bce = CatalogExplorerFactory.CatalogExplorer();

            try
            {
                //bce.ConnectionString = CatalogExplorerFactory.CatalogExplorer().ConnectionString;
                ReceiveLocation rl = null;
                foreach (ReceivePort port in CatalogExplorerFactory.CatalogExplorer().Applications[appName].ReceivePorts)
                {
                    foreach (ReceiveLocation rloc in port.ReceiveLocations)
                    {
                        if (!rloc.Name.Equals(recLocName))
                        {
                            continue;
                        }
                        rl = rloc;
                        break;
                    }
                }

                root = CreateDeveloperConceptualElement();
                if (null == rl)
                {
                    return;
                }

                tokenId = CleanAndPrep(appName + ".ReceiveLocations." + rl.ReceivePort.Name + rl.Name);
                TokenFile.GetTokenFile().AddTopicToken(tokenId, id);

                var intro = new XElement(xmlns + "introduction",
                                         new XElement(xmlns + "para", new XText(string.IsNullOrEmpty(rl.Description) ? "No description was available for this receive location." : rl.Description)));

                var section = new XElement(xmlns + "section",
                                           new XElement(xmlns + "title", new XText("Receive Location Properties")),
                                           new XElement(xmlns + "content",
                                                        new XElement(xmlns + "table",
                                                                     new XElement(xmlns + "tableHeader",
                                                                                  new XElement(xmlns + "row",
                                                                                               new XElement(xmlns + "entry", new XText("Property")),
                                                                                               new XElement(xmlns + "entry", new XText("Value")))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Address")),
                                                                                  new XElement(xmlns + "entry", new XText(string.IsNullOrEmpty(rl.Address) ? "N/A" : rl.Address))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Custom Data")),
                                                                                  new XElement(xmlns + "entry", new XText(string.IsNullOrEmpty(rl.CustomData) ? "N/A" : rl.CustomData))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Enabled")),
                                                                                  new XElement(xmlns + "entry", new XText(rl.Enable.ToString()))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("End Date")),
                                                                                  new XElement(xmlns + "entry", new XText(rl.EndDate.ToString()))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("End Date Enabled")),
                                                                                  new XElement(xmlns + "entry", new XText(rl.EndDateEnabled.ToString()))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Fragment Messages")),
                                                                                  new XElement(xmlns + "entry", new XText(rl.FragmentMessages.ToString()))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("From Time")),
                                                                                  new XElement(xmlns + "entry", new XText(rl.FromTime.ToString()))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Public Address")),
                                                                                  new XElement(xmlns + "entry", new XText(string.IsNullOrEmpty(rl.PublicAddress) ? "N/A" : rl.PublicAddress))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Receive Handler Transport")),
                                                                                  new XElement(xmlns + "entry", new XText(null == rl.ReceiveHandler ? "N/A" : rl.ReceiveHandler.TransportType.Name))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Receive Pipeline")),
                                                                                  GetPipelineEntry(rl.ReceivePipeline)),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Receive Pipeline Data")),
                                                                                  new XElement(xmlns + "entry", new XText(string.IsNullOrEmpty(rl.ReceivePipelineData) ? "N/A" : rl.ReceivePipelineData))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Receive Port")),
                                                                                  new XElement(xmlns + "entry", new XElement(xmlns + "token", new XText(CleanAndPrep(appName + ".ReceivePorts." + rl.ReceivePort.Name))))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Send Pipeline")),
                                                                                  GetPipelineEntry(rl.SendPipeline)),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Send Pipeline Data")),
                                                                                  new XElement(xmlns + "entry", new XText(string.IsNullOrEmpty(rl.SendPipelineData) ? "N/A" : rl.SendPipelineData))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Service Window Enabled")),
                                                                                  new XElement(xmlns + "entry", new XText(rl.ServiceWindowEnabled.ToString()))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Start Date")),
                                                                                  new XElement(xmlns + "entry", new XText(rl.StartDate.ToString()))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Start Date Enabled")),
                                                                                  new XElement(xmlns + "entry", new XText(rl.StartDateEnabled.ToString()))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Transport Type Name")),
                                                                                  new XElement(xmlns + "entry", new XText(null == rl.TransportType ? "N/A" : rl.TransportType.Name))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Transport Type Capabilities")),
                                                                                  new XElement(xmlns + "entry", new XText(null == rl.TransportType ? "N/A" : rl.TransportType.Capabilities.ToString()))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Transport Type Data")),
                                                                                  new XElement(xmlns + "entry", new XText(string.IsNullOrEmpty(rl.TransportTypeData) ? "N/A" : rl.TransportTypeData)))
                                                                     )));

                root.Add(intro, section);
                if (doc.Root != null)
                {
                    doc.Root.Add(root);
                }
            }
            catch (Exception ex)
            {
                HandleException("ReceiveLocationTopic.DoWork", ex);
            }
        }
コード例 #8
0
        void SaveTopic()
        {
            //var bce = CatalogExplorerFactory.CatalogExplorer();
            //bce.ConnectionString = CatalogExplorerFactory.CatalogExplorer().ConnectionString;
            try
            {
                root = CreateDeveloperConceptualElement();
                var      srs = new SqlRuleStore(CatalogExplorerFactory.CatalogExplorer().ConnectionString.Replace("BizTalkMgmtDb", rulesDb));
                XElement intro;
                //find our policy in the crowd
                Policy p = null;
                foreach (Policy policy in CatalogExplorerFactory.CatalogExplorer().Applications[appName].Policies)
                {
                    if (!policy.Name.Equals(ruleName))
                    {
                        continue;
                    }
                    p = policy;
                    break;
                }
                if (p == null)
                {
                    intro = new XElement(xmlns + "introduction", new XElement(xmlns + "para", new XText("Policy was not found!")));
                    root.Add(intro);
                    if (doc.Root != null)
                    {
                        doc.Root.Add(root);
                    }
                    ReadyToSave = true;
                    return;
                }

                var rs = srs.GetRuleSet(new RuleSetInfo(p.Name, p.MajorRevision, p.MinorRevision));

                root  = CreateDeveloperXmlReference();
                intro = new XElement(xmlns + "introduction", new XElement(xmlns + "para", new XText(string.Format("This section outlines the properties for the {0} rule set.", p.Name))));

                var exeConfInfo = new XElement(xmlns + "section",
                                               new XElement(xmlns + "title", new XText("Execution Configuration Properties")),
                                               new XElement(xmlns + "content",
                                                            new XElement(xmlns + "table",
                                                                         new XElement(xmlns + "tableHeader",
                                                                                      new XElement(xmlns + "row",
                                                                                                   new XElement(xmlns + "entry", new XText("Property")),
                                                                                                   new XElement(xmlns + "entry", new XText("Value")))),
                                                                         new XElement(xmlns + "row",
                                                                                      new XElement(xmlns + "entry", new XText("Fact Retriever Class Name")),
                                                                                      new XElement(xmlns + "entry", new XText(null == rs.ExecutionConfiguration.FactRetriever ? "N/A" : rs.ExecutionConfiguration.FactRetriever.ClassName ?? "N/A"))),
                                                                         new XElement(xmlns + "row",
                                                                                      new XElement(xmlns + "entry", new XText("Fact Retriever Assembly Name")),
                                                                                      new XElement(xmlns + "entry", new XText(null == rs.ExecutionConfiguration.FactRetriever ? "N/A" : rs.ExecutionConfiguration.FactRetriever.AssemblyName ?? "N/A"))),
                                                                         new XElement(xmlns + "row",
                                                                                      new XElement(xmlns + "entry", new XText("Max Execution Loop Depth")),
                                                                                      new XElement(xmlns + "entry", new XText(rs.ExecutionConfiguration.MaxExecutionLoopDepth.ToString()))),
                                                                         new XElement(xmlns + "row",
                                                                                      new XElement(xmlns + "entry", new XText("Maximum Working Memory Size")),
                                                                                      new XElement(xmlns + "entry", new XText(rs.ExecutionConfiguration.MaxWorkingMemorySize.ToString()))),
                                                                         new XElement(xmlns + "row",
                                                                                      new XElement(xmlns + "entry", new XText("Translation Duration (milliseconds)")),
                                                                                      new XElement(xmlns + "entry", new XText(rs.ExecutionConfiguration.TranslationDuration.ToString()))),
                                                                         new XElement(xmlns + "row",
                                                                                      new XElement(xmlns + "entry", new XText("Translator Class")),
                                                                                      new XElement(xmlns + "entry", new XText(null == rs.ExecutionConfiguration.Translator ? "N/A" : rs.ExecutionConfiguration.Translator.ClassName ?? "N/A"))),
                                                                         new XElement(xmlns + "row",
                                                                                      new XElement(xmlns + "entry", new XText("Translator Assembly")),
                                                                                      new XElement(xmlns + "entry", new XText(null == rs.ExecutionConfiguration.Translator ? "N/A" : rs.ExecutionConfiguration.Translator.AssemblyName ?? "N/A")))
                                                                         )));

                var         rulesList = new List <XElement>();
                IEnumerator iter      = rs.Rules.GetEnumerator();

                while (iter.MoveNext())
                {
                    var de = (DictionaryEntry)iter.Current;
                    var r  = de.Value as Rule;
                    if (null == r)
                    {
                        continue;
                    }
                    var rsi  = new RuleSetInfo(p.Name, p.MajorRevision, p.MinorRevision);
                    var rdse = new RuleDisplayStringExtractor(srs, rsi);
                    var s    = new XElement(xmlns + "section",
                                            new XElement(xmlns + "title", new XText(string.Format("Rule: {0}", r.Name))),
                                            new XElement(xmlns + "content",
                                                         new XElement(xmlns + "para", new XElement(xmlns + "legacyBold", new XText("Rule display:"))),
                                                         new XElement(xmlns + "code", new XAttribute("language", "other"), new XText(rdse.ExtractRuleDisplayString(r))),
                                                         new XElement(xmlns + "para", new XElement(xmlns + "legacyBold", new XText("Rule properties:"))),
                                                         new XElement(xmlns + "table",
                                                                      new XElement(xmlns + "tableHeader",
                                                                                   new XElement(xmlns + "row",
                                                                                                new XElement(xmlns + "entry", new XText("Property")),
                                                                                                new XElement(xmlns + "entry", new XText("Value")))),
                                                                      new XElement(xmlns + "row",
                                                                                   new XElement(xmlns + "entry", new XText("Active")),
                                                                                   new XElement(xmlns + "entry", new XText(r.Active.ToString()))),
                                                                      new XElement(xmlns + "row",
                                                                                   new XElement(xmlns + "entry", new XText("Priority")),
                                                                                   new XElement(xmlns + "entry", new XText(r.Priority.ToString()))),
                                                                      new XElement(xmlns + "row",
                                                                                   new XElement(xmlns + "entry", new XText("Vocabulary Definition Id")),
                                                                                   new XElement(xmlns + "entry", new XText(r.VocabularyLink == null ? "N/A" : r.VocabularyLink.DefinitionId ?? "N/A"))),
                                                                      new XElement(xmlns + "row",
                                                                                   new XElement(xmlns + "entry", new XText("Vocabulary Id")),
                                                                                   new XElement(xmlns + "entry", new XText(r.VocabularyLink == null ? "N/A" : r.VocabularyLink.VocabularyId ?? "N/A")))
                                                                      )));

                    rulesList.Add(s);
                }

                //parent section
                var section = new XElement(xmlns + "section",
                                           new XElement(xmlns + "title", new XText("Business RuleSet Properties")),
                                           new XElement(xmlns + "content",
                                                        new XElement(xmlns + "para", new XText(rs.CurrentVersion.Description ?? "The current version of this rule set has no comments associated with it.")),
                                                        new XElement(xmlns + "table",
                                                                     new XElement(xmlns + "tableHeader",
                                                                                  new XElement(xmlns + "row",
                                                                                               new XElement(xmlns + "entry", new XText("Property")),
                                                                                               new XElement(xmlns + "entry", new XText("Value")))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Current Version")),
                                                                                  new XElement(xmlns + "entry", new XText(rs.CurrentVersion.MajorRevision + "." + rs.CurrentVersion.MinorRevision))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Last Modified By")),
                                                                                  new XElement(xmlns + "entry", new XText(rs.CurrentVersion.ModifiedBy))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Modification Timestamp")),
                                                                                  new XElement(xmlns + "entry", new XText(rs.CurrentVersion.ModifiedTime.ToString())))),
                                                        new XElement(xmlns + "sections", rulesList.ToArray(), exeConfInfo)
                                                        ));

                root.Add(intro, section);
                if (doc.Root != null)
                {
                    doc.Root.Add(root);
                }
            }
            catch (Exception ex)
            {
                HandleException("BusinessRuleTopic.DoWork", ex);
            }
        }
コード例 #9
0
        void SaveTopic()
        {
            //var bce = CatalogExplorerFactory.CatalogExplorer();
            try
            {
                //bce.ConnectionString = CatalogExplorerFactory.CatalogExplorer().ConnectionString;
                Schema s     = null;
                var    split = schemaName.Split(new[] { "___" }, StringSplitOptions.None);
                foreach (Schema schema in CatalogExplorerFactory.CatalogExplorer().Applications[appName].Schemas)
                {
                    if (!schema.FullName.Equals(split[0]) && !schema.RootName.Equals(split[1]))
                    {
                        continue;
                    }
                    s = schema;
                }

                if (s == null)
                {
                    throw new NullReferenceException("Schema " + schemaName + " was not found in the BizTalk ExplorerOM.");
                }

                schemaTitle = s.RootName == null ? schemaName : split[0] + "#" + split[1];
                sb.Append(
                    "<?xml version=\"1.0\" encoding=\"utf-8\"?><topic id=\"" + id + "\" revisionNumber=\"1\">");
                root = CreateDeveloperXmlReference();

                var intro   = new XElement(xmlns + "introduction", new XElement(xmlns + "para", new XText(string.IsNullOrEmpty(s.Description)? "No description was found for the schema." : s.Description)));
                var section = new XElement(xmlns + "section", new XElement(xmlns + "title", new XText("Schema Properties")),
                                           new XElement(xmlns + "content",
                                                        new XElement(xmlns + "table",
                                                                     new XElement(xmlns + "tableHeader",
                                                                                  new XElement(xmlns + "row",
                                                                                               new XElement(xmlns + "entry", new XText("Property")),
                                                                                               new XElement(xmlns + "entry", new XText("Value")))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Application")),
                                                                                  new XElement(xmlns + "entry", new XElement(xmlns + "token", new XText(CleanAndPrep(s.Application.Name))))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Always Track All Properties")),
                                                                                  new XElement(xmlns + "entry", new XText(s.Type == SchemaType.Property ? "does not apply to property schemas." : s.AlwaysTrackAllProperties.ToString()))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Assembly Qualified Name")),
                                                                                  new XElement(xmlns + "entry", new XElement(xmlns + "token", new XText(CleanAndPrep(appName + ".Assemblies." + s.BtsAssembly.DisplayName))))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Properties")),
                                                                                  new XElement(xmlns + "entry", s.Properties.Count > 0 ? DictionaryToTable(s.Properties, "Property Name", "Property Type") : new XElement(xmlns + "legacyItalic", new XText("(N/A)")))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Root Name")),
                                                                                  new XElement(xmlns + "entry", new XText(s.RootName ?? "(None)"))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Target Namespace")),
                                                                                  new XElement(xmlns + "entry", new XText(s.TargetNameSpace ?? "N/A"))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Tracked Property Names")),
                                                                                  s.TrackedPropertyNames.Count > 0 ? CollectionToList(s.TrackedPropertyNames) : new XElement(xmlns + "legacyItalic", new XText("(N/A)"))),
                                                                     new XElement(xmlns + "row",
                                                                                  new XElement(xmlns + "entry", new XText("Type")),
                                                                                  new XElement(xmlns + "entry", new XText(s.Type.ToString()))))));

                var content = new XElement(xmlns + "codeExample",
                                           new XElement(xmlns + "code", new XAttribute("language", "xml"), new XText(s.XmlContent)));

                root.Add(intro, section, content);
                sb.Append(root.ToString());
                sb.Append("</topic>");
            }
            catch (Exception ex)
            {
                HandleException("SchemaTopic.DoWork", ex);
            }
        }
コード例 #10
0
        /// <summary>
        /// Save a topic to the file system.
        /// </summary>
        /// <remarks>This method must be implemented in all inherited classes.</remarks>
        private void SaveTopic()
        {
            //var bce = CatalogExplorerFactory.CatalogExplorer();
            try
            {
                //bce.ConnectionString = CatalogExplorerFactory.CatalogExplorer().ConnectionString;

                var orch = CatalogExplorerFactory.CatalogExplorer().Applications[appName].Orchestrations[orchName];

                TokenFile.GetTokenFile().AddTopicToken(CleanAndPrep(appName + ".Orchestrations." + orchName), id);

                var root = CreateDeveloperConceptualElement();

                root.Add(new XElement(xmlns + "introduction",
                                      new XElement(xmlns + "para",
                                                   new XText(!string.IsNullOrEmpty(orch.Description)
                                                                 ? orch.Description
                                                                 : "No description was available from the orchestration."))));

                var orchSection = new XElement(xmlns + "section");

                #region content
                var content    = new XElement(xmlns + "content");
                var imageToken = CleanAndPrep(appName + ".Orchestrations." + orchName + "Image");
                content.Add(new XElement(xmlns + "token", imageToken),
                            new XElement(xmlns + "table", new XElement(xmlns + "title", new XText("Orchestration Properties")),
                                         new XElement(xmlns + "tableHeader",
                                                      new XElement(xmlns + "row",
                                                                   new XElement(xmlns + "entry",
                                                                                new XText(
                                                                                    "Property")),
                                                                   new XElement(xmlns + "entry",
                                                                                new XText("Value")))),
                                         new XElement(xmlns + "row",
                                                      new XElement(xmlns + "entry",
                                                                   new XText(
                                                                       "Application")),
                                                      new XElement(xmlns + "entry",
                                                                   new XElement(
                                                                       xmlns + "token",
                                                                       new XText(
                                                                           appName)))),
                                         new XElement(xmlns + "row",
                                                      new XElement(xmlns + "entry",
                                                                   new XText(
                                                                       "Assembly Qualified Name")),
                                                      new XElement(xmlns + "entry",
                                                                   new XElement(
                                                                       xmlns + "token",
                                                                       new XText(
                                                                           CleanAndPrep
                                                                               (orch.AssemblyQualifiedName))))),
                                         new XElement(xmlns + "row",
                                                      new XElement(xmlns + "entry",
                                                                   new XText(
                                                                       "Auto Resume Suspended Instances")),
                                                      new XElement(xmlns + "entry",
                                                                   new XText(
                                                                       orch.
                                                                       AutoResumeSuspendedInstances
                                                                       .ToString()))),
                                         new XElement(xmlns + "row",
                                                      new XElement(xmlns + "entry",
                                                                   new XText(
                                                                       "Auto Suspend Running Instances")),
                                                      new XElement(xmlns + "entry",
                                                                   new XText(
                                                                       orch.
                                                                       AutoSuspendRunningInstances
                                                                       .ToString()))),
                                         new XElement(xmlns + "row",
                                                      new XElement(xmlns + "entry",
                                                                   new XText(
                                                                       "Auto Terminate Instances (when unenlisting)")),
                                                      new XElement(xmlns + "entry",
                                                                   new XText(
                                                                       orch.
                                                                       AutoTerminateInstances
                                                                       .ToString()))),
                                         new XElement(xmlns + "row",
                                                      new XElement(xmlns + "entry",
                                                                   new XText(
                                                                       "Full Name")),
                                                      new XElement(xmlns + "entry",
                                                                   new XText(
                                                                       orch.FullName))),
                                         new XElement(xmlns + "row",
                                                      new XElement(xmlns + "entry",
                                                                   new XText("Host")),
                                                      GetNullable(orch.Host, "Name", appName + ".Host.")),
                                         new XElement(xmlns + "row",
                                                      new XElement(xmlns + "entry",
                                                                   new XText(
                                                                       "Tracking")),
                                                      new XElement(xmlns + "entry",
                                                                   new XText(
                                                                       orch.Tracking.
                                                                       ToString())))));
                orchSection.Add(content);
                #endregion

                root.Add(orchSection);

                #region port section
                var portSections = new List <XElement>();
                var opsList      = new XElement(xmlns + "list", new XAttribute("class", "bullet"));

                foreach (OrchestrationPort port in orch.Ports)
                {
                    if (port.Orchestration.FullName != orchName)
                    {
                        continue;
                    }
                    foreach (PortTypeOperation operation in port.PortType.Operations)
                    {
                        opsList.Add(new XElement(xmlns + "listItem",
                                                 new XText(string.Format("{0} ({1})", operation.Name, operation.Type))));
                    }

                    var ps = new XElement(xmlns + "section",
                                          new XElement(xmlns + "title", new XText(port.Name)),
                                          new XElement(xmlns + "content",
                                                       new XElement(xmlns + "para",
                                                                    new XText(
                                                                        "This port contains the following properties:")),
                                                       new XElement(xmlns + "table",
                                                                    new XElement(xmlns + "title",
                                                                                 new XText("Port Properties")),
                                                                    new XElement(xmlns + "tableHeader",
                                                                                 new XElement(xmlns + "row",
                                                                                              new XElement(
                                                                                                  xmlns +
                                                                                                  "entry",
                                                                                                  new XText
                                                                                                      ("Property")),
                                                                                              new XElement(
                                                                                                  xmlns +
                                                                                                  "entry",
                                                                                                  new XText
                                                                                                      ("Value")))),
                                                                    new XElement(xmlns + "row",
                                                                                 new XElement(xmlns + "entry",
                                                                                              new XText(
                                                                                                  "Binding")),
                                                                                 new XElement(xmlns + "entry",
                                                                                              new XText(
                                                                                                  port.Binding.
                                                                                                  ToString()))),
                                                                    new XElement(xmlns + "row",
                                                                                 new XElement(xmlns + "entry",
                                                                                              new XText(
                                                                                                  "Modifier")),
                                                                                 new XElement(xmlns + "entry",
                                                                                              new XText(
                                                                                                  port.Modifier
                                                                                                  .ToString
                                                                                                      ()))),
                                                                    new XElement(xmlns + "row",
                                                                                 new XElement(xmlns + "entry",
                                                                                              new XText
                                                                                                  ("Receive Port")),
                                                                                 GetNullable(port.ReceivePort,
                                                                                             "Name",
                                                                                             appName +
                                                                                             ".ReceivePorts.")),
                                                                    new XElement(xmlns + "row",
                                                                                 new XElement(xmlns + "entry",
                                                                                              new XText(
                                                                                                  "Send Port")),
                                                                                 GetNullable(port.SendPort,
                                                                                             "Name",
                                                                                             appName +
                                                                                             ".SendPorts.")),
                                                                    new XElement(xmlns + "row",
                                                                                 new XElement(xmlns + "entry",
                                                                                              new XText(
                                                                                                  "Send Port Group")),
                                                                                 GetNullable(
                                                                                     port.SendPortGroup, "Name",
                                                                                     appName +
                                                                                     ".SendPortGroups."))),
                                                       new XElement(xmlns + "para", new XText("This port definition performs the following operations:")),
                                                       opsList));
                    portSections.Add(ps);
                }

                #endregion

                root.Add(new XElement(xmlns + "section",
                                      new XElement(xmlns + "title", new XText("Orchestration Ports")),
                                      new XElement(xmlns + "content",
                                                   new XElement(xmlns + "sections", portSections.ToArray()))));

                if (doc.Root != null)
                {
                    doc.Root.Add(root);
                }
                OrchestrationImage.Instance().Orchestrations.Enqueue(new BtsOrch(orch.Application.Name, orch.FullName));
            }
            catch (Exception ex)
            {
                PrintLine("{0}: {1}", ex.GetType(), ex.Message);
            }
        }
コード例 #11
0
        private void SaveTopic()
        {
            var app   = CatalogExplorerFactory.CatalogExplorer().Applications[appName];
            var root  = CreateDeveloperOrientationElement();
            var intro = new XElement(xmlns + "introduction",
                                     new XElement(xmlns + "para", new XText(string.IsNullOrEmpty(app.Description)
                    ? "No description was given."
                    : app.Description)));
            var inThis = new XElement(xmlns + "inThisSection",
                                      new XText("This application contains the BizTalk artifacts listed below."));

            #region orchestrations
            try
            {
                if (null != app.Orchestrations)
                {
                    if (app.Orchestrations.Count > 0)
                    {
                        PrintLine("{0} orchestrations count: {1}", appName, app.Orchestrations.Count);
                        var olist = new List <string>();
                        inThis.Add(new XElement(xmlns + "para", new XElement(xmlns + "legacyBold", new XText("Orchestrations:"))));
                        foreach (BtsOrchestration orch in app.Orchestrations)
                        {
                            olist.Add(orch.FullName);
                            inThis.Add(new XElement(xmlns + "para",
                                                    new XElement(xmlns + "token",
                                                                 new XText(CleanAndPrep(appName + ".Orchestrations." + orch.FullName)))));
                        }
                        PrintLine("creating orchestrations topic for {0}", appName);
                        orchsTopic = new OrchestrationsTopic(Path.Combine(topicRelativePath, "Orchestrations"), app.Name, olist.ToArray());
                    }
                    topics.Add(orchsTopic);
                }
            }
            catch (Exception ex)
            {
                HandleException("BtsAppTopic.DoWork(orchestrations)", ex);
            }
            #endregion

            #region send ports

            try
            {
                if (app.SendPorts != null)
                {
                    PrintLine("send ports count: {0}", app.SendPorts.Count);
                    var ports = new List <string>();
                    if (app.SendPorts.Count > 0)
                    {
                        inThis.Add(new XElement(xmlns + "para",
                                                new XElement(xmlns + "legacyBold", new XText("Send Ports:"))));
                        foreach (SendPort port in app.SendPorts)
                        {
                            inThis.Add(new XElement(xmlns + "para",
                                                    new XElement(xmlns + "token",
                                                                 new XText(CleanAndPrep(appName + ".SendPorts." + port.Name)))));
                            ports.Add(port.Name);
                        }
                        PrintLine("creating send ports topic for {0}", appName);
                        spsTopic = new SendPortsTopic(appName, Path.Combine(topicRelativePath, "Send Ports"), ports.ToArray());
                    }
                    topics.Add(spsTopic);
                }
            }
            catch (Exception ex)
            {
                HandleException("BtsAppTopic.DoWork(send ports)", ex);
            }

            #endregion

            #region receive ports
            if (app.ReceivePorts != null)
            {
                if (app.ReceivePorts.Count > 0)
                {
                    PrintLine("{0} has {1} receive ports", appName, app.ReceivePorts.Count);
                    var rlElement = new XElement(xmlns + "para", new XElement(xmlns + "legacyBold", new XText("Receive Locations:")));
                    var recLocs   = new List <XElement>();

                    var rpElement = new XElement(xmlns + "para", new XElement(xmlns + "legacyBold", new XText("Receive Ports:")));

                    var jarPorts = new string[app.ReceivePorts.Count][];

                    //iterate through the receive ports for the array
                    var jagIterator         = 0;
                    var receivePortIterator = 0;
                    var receivePorts        = new string[app.ReceivePorts.Count];
                    foreach (ReceivePort port in app.ReceivePorts)
                    {
                        //collect the receive port name
                        receivePorts[receivePortIterator] = port.Name;
                        receivePortIterator++;

                        PrintLine("{0} has {1} receive locations");
                        rpElement.Add(new XElement(xmlns + "para",
                                                   new XElement(xmlns + "token", new XText(CleanAndPrep(appName + ".ReceivePorts." + port.Name)))));
                        if (port.ReceiveLocations.Count > 0)
                        {
                            jarPorts[jagIterator] = new string[port.ReceiveLocations.Count];
                            for (var j = 0; j < port.ReceiveLocations.Count; j++)
                            {
                                jarPorts[jagIterator][j] = port.ReceiveLocations[j].Name;
                                recLocs.Add(new XElement(xmlns + "para",
                                                         new XElement(xmlns + "token",
                                                                      new XText(CleanAndPrep(appName + ".ReceiveLocations." + port.ReceiveLocations[j].ReceivePort.Name + port.ReceiveLocations[j].Name)))));
                            }
                            jagIterator++;

                            if (null == rlsTopic)
                            {
                                PrintLine("creating receive locations topic for {0}", appName);
                                rlsTopic = new ReceiveLocationsTopic(appName, Path.Combine(topicRelativePath, "Receive Locations"), jarPorts);
                            }

                            topics.Add(rlsTopic);
                        }

                        PrintLine("creating receive ports topic for {0}", appName);
                        rpsTopic = new ReceivePortsTopic(appName, Path.Combine(topicRelativePath, "Receive Ports"), receivePorts);
                        topics.Add(rpsTopic);
                    }
                    inThis.Add(rpElement);

                    if (recLocs.Count > 0)
                    {
                        rlElement.Add(recLocs.ToArray());
                        inThis.Add(rlElement);
                    }
                }
            }

            #endregion

            #region policies

            if (null != app.Policies)
            {
                if (app.Policies.Count > 0)
                {
                    PrintLine("{0} has {1} policies", appName, app.Policies.Count);
                    if (string.IsNullOrEmpty(ProjectConfiguration.RulesDatabase))
                    {
                        throw new NullReferenceException("The Rules Engine Database configuration setting is null or empty.");
                    }
                    inThis.Add(new XElement(xmlns + "legacyBold", new XText("Policies:")));

                    var rules         = new string[app.Policies.Count];
                    var rulesIterator = 0;
                    foreach (Policy policy in app.Policies)
                    {
                        rules[rulesIterator] = policy.Name;
                        rulesIterator++;
                        inThis.Add(new XElement(xmlns + "para",
                                                new XElement(xmlns + "token",
                                                             new XText(
                                                                 CleanAndPrep(appName + ".Policies." + policy.Name)))));
                    }

                    PrintLine("creating business rules topic for {0}", appName);
                    bsTopic = new BusinessRulesTopic(appName, Path.Combine(topicRelativePath, "Policies"), rules);
                }
                topics.Add(bsTopic);
            }

            #endregion

            #region schemas
            if (null != app.Schemas)
            {
                if (app.Schemas.Count > 0)
                {
                    PrintLine("{0} has {1} schemas", appName, app.Schemas.Count);
                    var schemaNames = new string[app.Schemas.Count];
                    for (var i = 0; i < app.Schemas.Count; i++)
                    {
                        schemaNames[i] = app.Schemas[i].FullName + "___" + app.Schemas[i].RootName;
                    }

                    PrintLine("Creating schemas topic for {0}...", appName);
                    schTopic = new SchemasTopic(appName, Path.Combine(topicRelativePath, "Schemas"), schemaNames);
                    topics.Add(schTopic);
                    inThis.Add(new XElement(xmlns + "para", new XElement(xmlns + "legacyBold", new XText("Schemas:"))));

                    foreach (var name in schemaNames)
                    {
                        inThis.Add(new XElement(xmlns + "para", new XElement(xmlns + "token", new XText(CleanAndPrep(appName + ".Schemas." + name)))));
                    }
                }
            }

            #endregion

            #region transforms
            if (null != app.Transforms)
            {
                if (app.Transforms.Count > 0)
                {
                    PrintLine("{0} has {1} transforms", appName, app.Transforms.Count);
                    var mapNames = new string[app.Transforms.Count];

                    for (var i = 0; i < app.Transforms.Count; i++)
                    {
                        mapNames[i] = app.Transforms[i].FullName;
                    }

                    inThis.Add(new XElement(xmlns + "para", new XElement(xmlns + "legacyBold", new XText("Transforms:"))));
                    foreach (Transform transform in app.Transforms)
                    {
                        inThis.Add(new XElement(xmlns + "para",
                                                new XElement(xmlns + "token",
                                                             new XText(CleanAndPrep(appName + ".Transforms." + transform.FullName)))));
                    }

                    PrintLine("creating transforms (maps) topic for {0}", appName);
                    transTopic = new TransformsTopic(appName, Path.Combine(topicRelativePath, "Maps"), mapNames);
                    topics.Add(transTopic);
                }
            }
            #endregion

            //TODO: Is there no pipeline topic(s)?
            #region pipelines
            if (null != app.Pipelines)
            {
                PrintLine("{0} has {1} pipelines", appName, app.Pipelines.Count);
                if (app.Pipelines.Count > 0)
                {
                    inThis.Add(new XElement(xmlns + "para", new XText("Pipelines:")));
                    foreach (Pipeline pipeline in app.Pipelines)
                    {
                        inThis.Add(new XElement(xmlns + "para",
                                                new XElement(xmlns + "token",
                                                             new XText(CleanAndPrep(appName + ".Pipelines." + pipeline.FullName)))));
                    }
                }
            }

            #endregion

            #region assemblies
            if (null != app.Assemblies)
            {
                if (app.Assemblies.Count > 0)
                {
                    PrintLine("{0} has {1} assemblies", appName, app.Assemblies.Count);
                    inThis.Add(new XElement(xmlns + "para", new XElement(xmlns + "legacyBold", new XText("Resources:"))));
                    var assys        = new string[app.Assemblies.Count];
                    var assyIterator = 0;
                    foreach (BtsAssembly assembly in app.Assemblies)
                    {
                        assys[assyIterator] = assembly.Name;
                        assyIterator++;
                        inThis.Add(new XElement(xmlns + "para", new XElement(xmlns + "token", new XText(CleanAndPrep(appName + ".Assemblies." + assembly.Name)))));
                    }

                    PrintLine("creating assemblies topic for {0}", appName);
                    assyTopic = new AssembliesTopic(Path.Combine(topicRelativePath, "Resources"), appName, assys);
                    topics.Add(assyTopic);
                }
            }
            #endregion

            root.Add(intro, inThis);
            if (doc.Root != null)
            {
                doc.Root.Add(root);
            }
        }