コード例 #1
0
ファイル: Program.cs プロジェクト: riha/BtsWebDoc
        private static BizTalkArtifacts TransformArtifacts(BtsCatalogReader catalogReader)
        {
            var artifacts = new BizTalkArtifacts
            {
                Hosts          = ModelTransformer.TransformHosts(catalogReader.Hosts),
                Applications   = ModelTransformer.TransformApplications(catalogReader.Applications),
                Schemas        = ModelTransformer.TransformSchemas(catalogReader.Schemas),
                Transforms     = ModelTransformer.TransformTransforms(catalogReader.Transforms),
                SendPorts      = ModelTransformer.TransformSendPorts(catalogReader.SendPorts),
                SendPortGroups = ModelTransformer.TransformSendPortGroups(catalogReader.SendPortGroups),
                ReceivePorts   = ModelTransformer.TransformReceivePorts(catalogReader.ReceivePorts),
                Assemblies     = ModelTransformer.TransformAssemblies(catalogReader.Assemblies),
                Orchestrations = ModelTransformer.TransformOrchestrations(catalogReader.Orchestrations),
                Pipelines      = ModelTransformer.TransformPipelines(catalogReader.Pipelines)
            };

            ModelReferenceSetter.SetSchemaReferences(artifacts, catalogReader.Schemas);
            ModelReferenceSetter.SetReceivePortReferences(artifacts, catalogReader.ReceivePorts);
            ModelReferenceSetter.SetSendPortReferences(artifacts, catalogReader.SendPorts);
            ModelReferenceSetter.SetSendPortGroupReferences(artifacts, catalogReader.SendPortGroups);
            ModelReferenceSetter.SetAssemblyReferences(artifacts, catalogReader.Assemblies);
            ModelReferenceSetter.SetPipelineReferences(artifacts, catalogReader.Pipelines);
            ModelReferenceSetter.SetTransformReferences(artifacts, catalogReader.Transforms);
            ModelReferenceSetter.SetOrchestrationReferences(artifacts, catalogReader.Orchestrations);
            ModelReferenceSetter.SetHostReferences(artifacts, catalogReader.Hosts, catalogReader.Orchestrations, catalogReader.SendPorts, catalogReader.ReceivePorts);


            return(artifacts);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: riha/BtsWebDoc
        private static void ExceuteProgram(IEnumerable <string> args)
        {
            var sw = Stopwatch.StartNew();

            var p = ParseCommandParameters(args);

            if (p.ShouldShowHelp || !p.ShouldExport)
            {
                ShowHelp();
            }
            else
            {
                var catalogReader = new BtsCatalogReader(p.Server, p.Database, p.ExcludedApplications);

                if (string.IsNullOrEmpty(p.Environment))
                {
                    p.Environment = catalogReader.GroupName;
                }

                var manifest = new Manifest(DateTime.Now, p.Server, p.Database, p.Comment, p.Environment);

                var exportFolderPath = Path.Combine(GetDocsExportFolder(p.Folder), manifest.Version);

                DirectoryHelper.CreateDirectory(exportFolderPath);

                //First we create a object graph of our own
                BizTalkArtifacts artifacts = TransformArtifacts(catalogReader);

                //Secondly we use our object graph to set all refernces and finally serlize it to disk
                ExportArtifacts(catalogReader, manifest, exportFolderPath, artifacts);

                Log.Info("Completed export of BtsWebDoc documentaion to {0} in {1} sec.", exportFolderPath, sw.Elapsed.TotalSeconds);
            }
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: riha/BtsWebDoc
        private static void ExportArtifacts(BtsCatalogReader catalogReader, Manifest manifest, string exportFolderPath, BizTalkArtifacts artifacts)
        {
            var dataExporter = new ApplicationDataExporter(exportFolderPath);

            dataExporter.ExportApplicationData(artifacts, catalogReader.Applications);
            dataExporter.ExportHostData(artifacts, catalogReader.Hosts);

            var assetsExporter = new AssetsExporter(exportFolderPath);

            assetsExporter.ExportMapSources(catalogReader.Transforms);
            assetsExporter.ExportSchemaSources(catalogReader.Schemas);
            assetsExporter.ExportOrchestrationOverviews(catalogReader.Orchestrations);

            manifest.Save(Path.Combine(exportFolderPath, Manifest.FileName));
        }