Example #1
0
        public void PortNotResponde(string server, int number, Exception e)
        {
            lock (configuration)
            {
                Port p = new Port();
                p.Number    = number;
                p.Exception = e;

                ((Server)configuration.ServerTable[server]).UnreachablePorts.Add(p);
                lock (eventLogger)
                {
                    eventLogger.LogEventLogError("On Host : \'" + server + "\' Port : \'" + number.ToString() + "\'  is Not Accessable. Error Message : " + e.Message);
                }
                count++;

                System.Collections.IDictionaryEnumerator itr = ((Server)configuration.ServerTable[server]).PortTable.GetEnumerator();
                itr.Reset();
                itr.MoveNext();

                Port pfirst = (Port)itr.Value;
                if (pfirst.HasNumber)
                {
                    if (count == ((Server)configuration.ServerTable[server]).PortTable.Count)
                    {
                        //Thread.Sleep(500);
                        Post(server);
                        RefreshView();
                    }
                }
                else
                {
                    if ((pfirst.NumberRangeEnd - pfirst.NumberRangeBegin) == count)
                    {
                        //Thread.Sleep(500);
                        Post(server);
                        RefreshView();
                    }
                }
            }
        }
 public void Reset()
 {
     Enumerator.Reset();
 }