public void ApplyChanges() { BizTalkApplication.BtsCatalogExplorer.SaveChanges(); // TODO ? BtsCatalogExplorer.Refresh() would be enough ? // reload application management data to ensure consistency BizTalkApplication = BizTalkServerGroup.Applications[BizTalkApplication.Name].BizTalkApplication; }
public Application(BizTalkApplication application, ApplicationCollection applicationCollection) { _applicationCollection = applicationCollection; BizTalkApplication = application ?? throw new ArgumentNullException(nameof(application)); Orchestrations = new OrchestrationCollection(BizTalkApplication.Orchestrations); ReceivePorts = new ReceivePortCollection(BizTalkApplication.ReceivePorts); SendPorts = new SendPortCollection(BizTalkApplication.SendPorts); }
internal static BizTalkApplication TransformModel(Microsoft.BizTalk.ExplorerOM.Application omApplication) { var application = new BizTalkApplication(); application.Name = omApplication.Name; application.Description = omApplication.Description; return(application); }
private void refreshToolStripMenuItem_Click(object sender, EventArgs e) { ApplicationLoad appLoad = treeViewBizTalkApplications.SelectedNode.Tag as ApplicationLoad; if (appLoad != null) { Microsoft.BizTalk.ExplorerOM.Application refreshedApp = explorerHelper.GetApplication(appLoad.Application.Name); appLoad.Application = refreshedApp; LoadApplicationArtifactsProperties(appLoad.Application, treeViewBizTalkApplications.SelectedNode); } }
public Application(BizTalkApplication application) { if (application == null) { throw new ArgumentNullException("application"); } BizTalkApplication = application; Orchestrations = new OrchestrationCollection(BizTalkApplication.Orchestrations); ReceivePorts = new ReceivePortCollection(BizTalkApplication.ReceivePorts); SendPorts = new SendPortCollection(BizTalkApplication.SendPorts); }
public Dictionary <string, string> ResolveDependency(string applicationName) { Dictionary <string, string> dependency = new Dictionary <string, string>(); List <string> depe = new List <string>(); Microsoft.BizTalk.ExplorerOM.Application application = explorerHelper.GetApplication(applicationName); if (application != null) { var qassembly = from assembly in explorerHelper.GetApplication(applicationName).Assemblies.Cast <Microsoft.BizTalk.ExplorerOM.BtsAssembly>() orderby assembly.DisplayName select assembly; foreach (Microsoft.BizTalk.ExplorerOM.BtsAssembly assembly in qassembly.ToList()) { AssemblyInfo assemblyInfo = new AssemblyInfo(); assemblyInfo.Name = assembly.Name; assemblyInfo.Version = assembly.Version; assemblyInfo.Culture = assembly.Culture; assemblyInfo.PublicKeyToken = assembly.PublicKeyToken; depe.AddRange(GetDependentAssemblies(assemblyInfo)); } } foreach (var item in depe) { foreach (Microsoft.BizTalk.ExplorerOM.BtsAssembly item2 in explorerHelper.CatalogExplorer.Assemblies) { if (item == item2.DisplayName && item2.Application.Name != applicationName) { if (!dependency.ContainsKey(item)) { dependency.Add(item, item2.Application.Name); } } } } // List referenced application if (application != null) { foreach (Microsoft.BizTalk.ExplorerOM.Application item in application.BackReferences) { dependency.Add(item.Name + ": Referenced Application", item.Name); } } return(dependency); }
private void LoadApplicationArtifactsProperties(Microsoft.BizTalk.ExplorerOM.Application application, TreeNode parentNode) { listPolicy.Clear(); parentNode.Nodes.Clear(); treeViewBizTalkApplications.BeginUpdate(); this.FormState = FormStateEnum.Processing; if (application != null) { if (application.Assemblies.Count > 0) { TreeNode assembliesNode = parentNode.Nodes.Add("Assemblies"); assembliesNode.ImageIndex = 1; assembliesNode.SelectedImageIndex = 1; var qassembly = from assembly in application.Assemblies.Cast <Microsoft.BizTalk.ExplorerOM.BtsAssembly>() orderby assembly.DisplayName select assembly; foreach (Microsoft.BizTalk.ExplorerOM.BtsAssembly assembly in qassembly.ToList()) { TreeNode assemblyNode = assembliesNode.Nodes.Add(assembly.DisplayName); assemblyNode.Tag = assembly; assemblyNode.ImageIndex = 1; assemblyNode.SelectedImageIndex = 1; // Load Orchestrations if (assembly.Orchestrations.Count > 0) { TreeNode orchestrationsNode = assemblyNode.Nodes.Add("Orchestrations"); orchestrationsNode.ImageIndex = 23; // 2; orchestrationsNode.SelectedImageIndex = 23; //2; var q = from orchestration in assembly.Orchestrations.Cast <Microsoft.BizTalk.ExplorerOM.BtsOrchestration>() orderby orchestration.FullName select orchestration; foreach (Microsoft.BizTalk.ExplorerOM.BtsOrchestration orchestration in q.ToList()) { try { TreeNode node = orchestrationsNode.Nodes.Add(orchestration.FullName); node.ImageIndex = 2; node.SelectedImageIndex = 2; // BtsOrchestrationHelper orch = new BtsOrchestrationHelper(orchestration); node.Tag = orchestration; } catch (Exception ex) { MessageBox.Show(ex.Message); } } } // Load Schemas if (assembly.Schemas.Count > 0) { TreeNode schemasNode = assemblyNode.Nodes.Add("Schemas"); schemasNode.ImageIndex = 23; // 6; schemasNode.SelectedImageIndex = 23; // 6; var q = from schema in assembly.Schemas.Cast <Microsoft.BizTalk.ExplorerOM.Schema>() orderby schema.FullName select schema; foreach (Microsoft.BizTalk.ExplorerOM.Schema schema in q.ToList()) { string nodeName = string.IsNullOrEmpty(schema.RootName) ? schema.FullName : string.Format("{0}+{1}", schema.FullName, schema.RootName); TreeNode node = schemasNode.Nodes.Add(nodeName); node.Tag = schema; node.ImageIndex = 6; node.SelectedImageIndex = 6; } } // Load Pipelines if (assembly.Pipelines.Count > 0) { TreeNode pipelinesNode = assemblyNode.Nodes.Add("Pipelines"); pipelinesNode.ImageIndex = 23; //5; pipelinesNode.SelectedImageIndex = 23; // 5; var q = from pipeline in assembly.Pipelines.Cast <Microsoft.BizTalk.ExplorerOM.Pipeline>() orderby pipeline.FullName select pipeline; foreach (Microsoft.BizTalk.ExplorerOM.Pipeline pipeline in q.ToList()) { TreeNode node = pipelinesNode.Nodes.Add(pipeline.FullName); PipelineInfo pipelineTag = new PipelineInfo(pipeline); node.Tag = pipelineTag; //node.ContextMenuStrip = contextMenuStrip2; node.ImageIndex = 5; node.SelectedImageIndex = 5; } } // Load transforms if (assembly.Transforms.Count > 0) { TreeNode transformsNode = assemblyNode.Nodes.Add("Maps"); transformsNode.ImageIndex = 23; // 3; transformsNode.SelectedImageIndex = 23; // 3; var q = from transform in assembly.Transforms.Cast <Microsoft.BizTalk.ExplorerOM.Transform>() orderby transform.FullName select transform; foreach (Microsoft.BizTalk.ExplorerOM.Transform transform in q.ToList()) { TreeNode node = transformsNode.Nodes.Add(transform.FullName); node.Tag = transform; node.ImageIndex = 3; node.SelectedImageIndex = 3; } } } } if (listPolicy.Count > 0) { TreeNode policyNode = parentNode.Nodes.Add("Policies"); policyNode.Tag = listPolicy; policyNode.ImageIndex = 4; policyNode.SelectedImageIndex = 4; foreach (BreRuleSetInfo item in listPolicy) { TreeNode ruleNode = policyNode.Nodes.Add(string.Format("{0} - Version {1}.{2}", item.Name, item.MajorRevision.ToString(), item.MinorRevision.ToString())); ruleNode.Tag = item; ruleNode.ImageIndex = 4; ruleNode.SelectedImageIndex = 4; } } } this.FormState = FormStateEnum.NotProcessing; treeViewBizTalkApplications.EndUpdate(); }