Beispiel #1
0
        /**
         * <summary>This returns all the gathered information as a hashtable.
         * Particularly useful for crawling.</summary>
         * <returns>The dictionary (hashtable) containing the information about the
         * node.</returns>
         */
        public IDictionary Info()
        {
            GetGeoLoc();
            Hashtable ht = new Hashtable(UserData);

            ht.Add("type", _type);
            ht.Add("geo_loc", geo_loc);
            ht.Add("localips", _node.sys_link.GetLocalIPAddresses());
            ht.Add("neighbors", _node.sys_link.GetNeighbors());
            int wedge_count = 0;

            foreach (EdgeListener el in _node.EdgeListenerList)
            {
                WrapperEdgeListener wel = el as WrapperEdgeListener;
                if (wel != null)
                {
                    try {
                        wedge_count += el.Count;
                        ht.Add(TransportAddress.TATypeToString(wel.TAType), wel.UnderlyingCount);
                    } catch { }
                }
                else
                {
                    int count = 0;
                    try {
                        count = el.Count;
                    } catch { }
                    ht.Add(TransportAddress.TATypeToString(el.TAType), count);
                }
            }

            ht.Add("cons", _node.ConnectionTable.TotalCount);
            if (wedge_count != 0)
            {
                ht.Add("wedges", wedge_count);
            }
            if (_so != null)
            {
                ht.Add("sas", _so.SACount);
            }
            return(ht);
        }
 public EdgeCreationWrapper(TransportAddress ta, EdgeListener.EdgeCreationCallback ecb,
     Edge edge, WrapperEdgeListener parent)
 {
   ExternalECB = ecb;
   TA = ta;
   Parent = parent;
   _edge = edge;
   _called = 0;
 }