CollectEvent(object sender, CollectorEventArgs e)
        {
            // cast the sender object to the SnoopCollector we are expecting
            Collector snoopCollector = sender as Collector;

            if (snoopCollector == null)
            {
                Debug.Assert(false);    // why did someone else send us the message?
                return;
            }

            BoundarySegment boundSeg = e.ObjToSnoop as BoundarySegment;

            if (boundSeg != null)
            {
                Stream(snoopCollector.Data(), boundSeg);
                return;
            }

            BoundarySegmentArray boundSegArray = e.ObjToSnoop as BoundarySegmentArray;

            if (boundSegArray != null)
            {
                Stream(snoopCollector.Data(), boundSegArray);
                return;
            }
        }
        CollectEvent(object sender, CollectorEventArgs e)
        {
            // cast the sender object to the SnoopCollector we are expecting
            Collector snoopCollector = sender as Collector;

            if (snoopCollector == null)
            {
                Debug.Assert(false);    // why did someone else send us the message?
                return;
            }

            BoundarySegment bndSeg = e.ObjToSnoop as BoundarySegment;

            if (bndSeg != null)
            {
                Stream(snoopCollector.Data(), bndSeg);
                return;
            }

            BoundarySegmentArray segArray = e.ObjToSnoop as BoundarySegmentArray;    // NOTE: this is needed because BoundarySegmentArrayArray will display enumerable Snoop items

            if (segArray != null)
            {
                Stream(snoopCollector.Data(), segArray);
                return;
            }
        }
        private void Stream(ArrayList data, BoundarySegmentArray segArray)
        {
            data.Add(new Snoop.Data.ClassSeparator(typeof(BoundarySegmentArray)));

            IEnumerator iter = segArray.GetEnumerator();
            int i = 0;
            while (iter.MoveNext()) {
                data.Add(new Snoop.Data.Object(string.Format("Boundary segment {0:d}", i++), iter.Current));
            }
        }
        Stream(ArrayList data, BoundarySegmentArray segArray)
        {
            data.Add(new Snoop.Data.ClassSeparator(typeof(BoundarySegmentArray)));

            IEnumerator iter = segArray.GetEnumerator();
            int         i    = 0;

            while (iter.MoveNext())
            {
                data.Add(new Snoop.Data.Object(string.Format("Boundary segment {0:d}", i++), iter.Current));
            }
        }