internal void Load(BizTalkCore.BtsCatalogExplorer explorer, BizTalkCore.ReceiveLocation location) { this.Address = location.Address; this.Name = location.Name; this.receivePipeline = new NameIdPair(location.ReceivePipeline.FullName, ""); this.transportProtocol = location.TransportType.Name; this.data = location.TransportTypeData; this.CustomDescription = location.Description; if (location.SendPipeline != null) { this.sendPipeline = new NameIdPair(location.SendPipeline.FullName, ""); } else { this.sendPipeline = new NameIdPair("<Not configured>", ""); } this.serviceWindow = new ServiceWindow(); this.serviceWindow.Enabled = location.ServiceWindowEnabled; this.serviceWindow.StartDateEnabled = location.StartDateEnabled; this.serviceWindow.EndDateEnabled = location.EndDateEnabled; this.serviceWindow.EndTime = location.ToTime; this.serviceWindow.StartTime = location.FromTime; }
internal override void FixReferences(BizTalkCore.BtsCatalogExplorer explorer) { foreach (NameIdPair sendPort in this.sendPorts) { SendPort sp = this.parentInstallation.SendPorts[sendPort.Name] as SendPort; if (sp != null) { sendPort.Id = sp.NameIdPair.Id; } } return; }
/// <summary> /// Gets all of the applications deployed on the server /// </summary> /// <returns></returns> public static List <string> GetApplications() { List <string> applicationNames = new List <string>(); using (OM.BtsCatalogExplorer explorer = new OM.BtsCatalogExplorer()) { explorer.ConnectionString = GetConnectionString(BizTalkDatabaseServerName, BizTalkManagementDatabaseName); foreach (OM.Application app in explorer.Applications) { applicationNames.Add(app.Name); } } return(applicationNames); }
internal void Load(BizTalkCore.BtsCatalogExplorer explorer, BizTalkCore.Party party) { if (party != null) { this.QualifiedName = String.Empty; this.aliases.Clear(); this.sendPorts.Clear(); this.Data = party.CustomData; this.signatureCert = new EncryptionCert(party.SignatureCert); if (party.Aliases != null) { foreach (BizTalkCore.PartyAlias alias in party.Aliases) { Alias a = new Alias(); // 2015/1/1 MTB Added try catch to handle exceptions bubbled up from BizTalk object model try { a.Name = alias.Name; } catch (InvalidCastException e) { a.Name = "Not Valued"; } a.IsAutoCreated = alias.IsAutoCreated; a.Qualifier = alias.Qualifier; a.Value = alias.Value; a.QualifiedName = a.Name + "_" + a.Qualifier + "_" + a.Value; this.aliases.Add(a); } } if (party.SendPorts != null) { foreach (BizTalkCore.SendPort sp in party.SendPorts) { this.sendPorts.Add(new NameIdPair(sp.Name, "")); } } } return; }
internal void Load(BizTalkCore.BtsCatalogExplorer explorer, BizTalkCore.Party party) { if (party != null) { this.QualifiedName = String.Empty; this.aliases.Clear(); this.sendPorts.Clear(); this.Data = party.CustomData; this.signatureCert = new EncryptionCert(party.SignatureCert); if (party.Aliases != null) { foreach (BizTalkCore.PartyAlias alias in party.Aliases) { Alias a = new Alias(); a.Name = alias.Name; a.IsAutoCreated = alias.IsAutoCreated; a.Qualifier = alias.Qualifier; a.Value = alias.Value; a.QualifiedName = a.Name + "_" + a.Qualifier + "_" + a.Value; this.aliases.Add(a); } } if (party.SendPorts != null) { foreach (BizTalkCore.SendPort sp in party.SendPorts) { this.sendPorts.Add(new NameIdPair(sp.Name, "")); } } } return; }
/// <summary> /// /// </summary> /// <param name="explorer"></param> internal override void FixReferences(Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer explorer) { TraceManager.SmartTrace.TraceIn(explorer); BizTalkCore.ReceivePort port = explorer.ReceivePorts[this.Name]; if (port != null) { // Outbound Transforms if (port.OutboundTransforms != null) { foreach (BizTalkCore.Transform transform in port.OutboundTransforms) { Transform t = this.Application.Maps[transform.FullName] as Transform; if (t != null) { t.ReceivePorts.Add(this.NameIdPair); this.outboundMaps.Add(t.NameIdPair); } } } // Inbound Transforms if (port.InboundTransforms != null) { foreach (BizTalkCore.Transform transform in port.InboundTransforms) { Transform t = this.Application.Maps[transform.FullName] as Transform; if (t != null) { t.ReceivePorts.Add(this.NameIdPair); this.inboundMaps.Add(t.NameIdPair); } } } // Locations try { foreach (ReceiveLocation location in this.receiveLocations) { NameIdPair nameIdPair = new NameIdPair(location.Name, this.Id); Pipeline pl = this.Application.ParentInstallation.Pipelines[location.ReceivePipeline.Name] as Pipeline; if (pl != null) { //Colin Dijkgraaf 20141010 //location.ReceivePipeline = pl.NameIdPair; //pl.ReceiveLocations.Add(nameIdPair); if (pl.Name == location.ReceivePipeline.Name) // Actually check that a match was found. { location.ReceivePipeline = pl.NameIdPair; pl.ReceiveLocations.Add(nameIdPair); } } if (this.twoWay) { pl = this.Application.ParentInstallation.Pipelines[location.SendPipeline.Name] as Pipeline; if (pl != null) { //Colin Dijkgraaf 20141010 //location.SendPipeline = pl.NameIdPair; if (pl.Name == location.SendPipeline.Name) // Actually check that a match was found. { location.SendPipeline = pl.NameIdPair; } } } Protocol p = this.Application.ParentInstallation.ProtocolTypes[location.TransportProtocol] as Protocol; if (p != null) { p.ReceiveLocations.Add(nameIdPair); //foreach (NameIdPair handler in p.ReceiveHandlers)CD 20140402 //{ //Host h = this.Application.ParentInstallation.Hosts[handler.Name] as Host; Host h = this.Application.ParentInstallation.Hosts[port.PrimaryReceiveLocation.ReceiveHandler.Name] as Host; if (h != null) { h.HostedReceiveLocations.Add(nameIdPair); location.ReceiveHandler = h.NameIdPair; } //} } } } catch (Exception ex) { TraceManager.SmartTrace.TraceError(ex); } TraceManager.SmartTrace.TraceOut(); return; } }