Esempio n. 1
0
        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;
            }

            // branch to all types we are concerned with
            AcDb.SymbolTableRecord tblRec = e.ObjToSnoop as AcDb.SymbolTableRecord;
            if (tblRec != null)
            {
                Stream(snoopCollector.Data(), tblRec);
                return;
            }

            AcDb.SymbolTable symTbl = e.ObjToSnoop as AcDb.SymbolTable; // need to use namespace or it thinks we are referring to this class "SymbolTable" instead!
            if (symTbl != null)
            {
                Stream(snoopCollector.Data(), symTbl);
                return;
            }
        }
Esempio n. 2
0
        Stream(ArrayList data, AcDb.SymbolTable symTbl)
        {
            data.Add(new Snoop.Data.ClassSeparator(typeof(AcDb.SymbolTable)));

            // There is no data unique to different types of SymbolTables, so we will just take
            // a short-cut here and print out the class name.  The virtuals it defines are already
            // taken care of by the UI (that is how we got the tree structure).
            // branch to all known major sub-classes
            data.Add(new Snoop.Data.ClassSeparator(symTbl.GetType()));
        }