-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOrchestrationPortDetails.cs
More file actions
76 lines (61 loc) · 2.46 KB
/
OrchestrationPortDetails.cs
File metadata and controls
76 lines (61 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
using Microsoft.BizTalk.ExplorerOM;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Microsys.EAI.BizTalkUtilities
{
public partial class OrchestrationPortDetails : Form
{
public BizTalkObject OrchestrationObject;
public OrchestrationPortDetails(BizTalkObject orchestrationObject)
{
OrchestrationObject = orchestrationObject;
InitializeComponent();
}
private void AddRow(DataTable details, string column1, string column2, string column3, string column4, string column5)
{
DataRow row = details.NewRow();
row[0] = column1;
row[1] = column2;
row[2] = column3;
row[3] = column4;
row[4] = column5;
details.Rows.Add(row);
}
private void OrchestrationPortDetails_Load(object sender, EventArgs e)
{
try
{
DataTable details = new DataTable();
details.Columns.Add("Port");
details.Columns.Add("Logical Name");
details.Columns.Add("Phisical Name");
details.Columns.Add("Port Type");
details.Columns.Add("Two Way");
BtsOrchestration orchestration = (BtsOrchestration)OrchestrationObject.NativeObject;
foreach (OrchestrationPort port in orchestration.Ports)
{
if (port.ReceivePort != null)
AddRow(details, "Receive Port", port.Name, port.ReceivePort.Name, port.PortType.FullName, port.ReceivePort.IsTwoWay.ToString());
else if (port.SendPort != null)
AddRow(details, "Send Port", port.Name, port.SendPort.Name, port.PortType.FullName, port.SendPort.IsTwoWay.ToString());
else if (port.SendPortGroup != null)
AddRow(details, "Send Port Group", port.Name, port.SendPortGroup.Name, port.PortType.FullName, "n.a.");
else
AddRow(details, "Unbound", port.Name, "Unbound", port.PortType.FullName, "n.a.");
}
detailGrid.DataSource = details;
}
catch (Exception exc)
{
MessageBox.Show(exc.Message);
}
}
}
}