Ejemplo n.º 1
0
        private void UpdatePropertiesPanel(XmlNode selectedItem)
        {
            if (selectedItem.Name == "input")
            {
                switch (selectedItem.Attributes["type"].Value)
                {
                case "MSMQ":
                    MyGrid = new MSMQIN(selectedItem, this.View);
                    break;

                case "MQ":
                    MyGrid = new MQIN(selectedItem, this.View);
                    break;

                case "FILE":
                    MyGrid = new FILEIN(selectedItem, this.View);
                    break;

                case "KAFKA":
                    MyGrid = new KAFKAIN(selectedItem, this.View);
                    break;

                case "HTTP":
                    MyGrid = new HTTPIN(selectedItem, this.View);
                    break;

                case "RABBITDEFEX":
                    MyGrid = new RABBITIN(selectedItem, this.View);
                    break;

                case "MQTT":
                    MyGrid = new MQTTIN(selectedItem, this.View);
                    break;

                case "TCPSERVER":
                    MyGrid = new TCPIN(selectedItem, this.View);
                    break;

                case "TESTSOURCE":
                    MyGrid = new TESTSOURCE(selectedItem, this.View);
                    break;
                }
            }
            else if (selectedItem.Name == "output" || selectedItem.Name == "altqueue")
            {
                switch (selectedItem.Attributes["type"].Value)
                {
                case "MSMQ":
                    MyGrid = new MSMQOUT(selectedItem, this.View);
                    break;

                case "MQ":
                    MyGrid = new MQOUT(selectedItem, this.View);
                    break;

                case "FILE":
                    MyGrid = new FILEOUT(selectedItem, this.View);
                    break;

                case "KAFKA":
                    MyGrid = new KAFKAOUT(selectedItem, this.View);
                    break;

                case "REST":
                    MyGrid = new RESTOUT(selectedItem, this.View);
                    break;

                case "HTTP":
                    MyGrid = new HTTPOUT(selectedItem, this.View);
                    break;

                case "TCPCLIENT":
                    MyGrid = new TCPOUT(selectedItem, this.View);
                    break;

                case "RABBITDEFEX":
                    MyGrid = new RABBITOUT(selectedItem, this.View);
                    break;

                case "MQTT":
                    MyGrid = new MQTTIN(selectedItem, this.View);
                    break;

                case "SMTP":
                    MyGrid = new SMTPOut(selectedItem, this.View);
                    break;

                case "FTP":
                    MyGrid = new FTPOut(selectedItem, this.View);
                    break;

                case "SINK":
                    MyGrid = new SINK(selectedItem, this.View);
                    break;
                }
            }
            else if (selectedItem.Name == "monitor")
            {
                MyGrid = new MonitorGrid(selectedItem, this.View);
            }
            else if (selectedItem.Name == "filter")
            {
                MyGrid = new Filter(selectedItem, this.View);
            }
            else if (selectedItem.Name == "pipe")
            {
                MyGrid = new PIPE(selectedItem, this.View);
            }
            else if (selectedItem.Name == "namespace")
            {
                MyGrid = new NameSpaceGrid(selectedItem, this.View);
            }
            else if (selectedItem.Name == "service")
            {
                MyGrid = new ServiceSetting(selectedItem, this.View);
            }
            else if (selectedItem.Name == "and" || selectedItem.Name == "or" || selectedItem.Name == "xor" || selectedItem.Name == "not")
            {
                MyGrid = new BooleanExpression(selectedItem, this.View);
            }
            else if (selectedItem.Name == "contains")
            {
                MyGrid = new ContainsFilter(selectedItem, this.View);
            }
            else if (selectedItem.Name == "equals")
            {
                MyGrid = new EqualsFilter(selectedItem, this.View);
            }
            else if (selectedItem.Name == "matches")
            {
                MyGrid = new MatchesFilter(selectedItem, this.View);
            }
            else if (selectedItem.Name == "length")
            {
                MyGrid = new LengthFilter(selectedItem, this.View);
            }
            else if (selectedItem.Name == "xpexists")
            {
                MyGrid = new XPExistsFilter(selectedItem, this.View);
            }
            else if (selectedItem.Name == "xpmatches")
            {
                MyGrid = new XPMatchesFilter(selectedItem, this.View);
            }
            else if (selectedItem.Name == "xpequals")
            {
                MyGrid = new XPEqualsFilter(selectedItem, this.View);
            }
            else if (selectedItem.Name == "dateRange")
            {
                MyGrid = new DateRangeFilter(selectedItem, this.View);
            }
            else if (selectedItem.Name == "contextContains")
            {
                MyGrid = new ContextFilter(selectedItem, this.View);
            }

            OnPropertyChanged("MyGrid");
        }
Ejemplo n.º 2
0
 public static extern bool GetNamedPipeInfo([In] IntPtr hNamedPipe, out PIPE lpFlags, IntPtr lpOutBufferSize, IntPtr lpInBufferSize, IntPtr lpMaxInstances);
Ejemplo n.º 3
0
 public static T GetData <T>(IDataRecord reader,
                             string columnName,
                             bool ignoreException = true)
 {
     try
     {
         return((T)Convert.ChangeType(((reader[columnName] == DBNull.Value) ? default(T) : reader[columnName]), typeof(T)));
     }
     catch (Exception e)
     {
         if (ignoreException)
         {
             return(default(T));
         }
         ErrorLogger.LogError(e, "getData(IDataRecord reader, string columnName)", reader + PIPE.ToString() + columnName);
         throw e;
     }
 }