Example #1
0
        Stream(ArrayList data, PublishEntityEventArgs args)
        {
            data.Add(new Snoop.Data.ClassSeparator(typeof(PublishEntityEventArgs)));

            data.Add(new Snoop.Data.ObjectId("Effective block layer ID", args.EffectiveBlockLayerId));
            data.Add(new Snoop.Data.Object("Entity", args.Entity));
            data.Add(new Snoop.Data.Bool("Is cancelled", args.IsCancelled));
            data.Add(new Snoop.Data.Object("Plot logger", args.PlotLogger));
            data.Add(new Snoop.Data.String("Unique entity ID", args.UniqueEntityId));
        }
Example #2
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;
            }

            // see if it is a type we are responsible for
            AboutToBeginPublishingEventArgs aboutBeginPub = e.ObjToSnoop as AboutToBeginPublishingEventArgs;

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

            AboutToBeginBackgroundPublishingEventArgs aboutBeginBgPub = e.ObjToSnoop as AboutToBeginBackgroundPublishingEventArgs;

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

            PublishEventArgs pubEvent = e.ObjToSnoop as PublishEventArgs;

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

            BeginPublishingSheetEventArgs beginSheetArgs = e.ObjToSnoop as BeginPublishingSheetEventArgs;

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

            BeginAggregationEventArgs beginAggrArgs = e.ObjToSnoop as BeginAggregationEventArgs;

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

            PublishSheetEventArgs pubSheetArgs = e.ObjToSnoop as PublishSheetEventArgs;

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

            PublishEntityEventArgs pubEntityArgs = e.ObjToSnoop as PublishEntityEventArgs;

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

            PublishUIEventArgs pubUiArgs = e.ObjToSnoop as PublishUIEventArgs;

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

            Dwf3dNavigationTreeNode dwf3dNavNode = e.ObjToSnoop as Dwf3dNavigationTreeNode;

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

            DwfNode dwfNode = e.ObjToSnoop as DwfNode;

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

            EPlotAttribute eplotAttr = e.ObjToSnoop as EPlotAttribute;

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

            EPlotProperty eplotProp = e.ObjToSnoop as EPlotProperty;

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

            EPlotPropertyBag eplotPropBag = e.ObjToSnoop as EPlotPropertyBag;

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

            EPlotResource eplotResource = e.ObjToSnoop as EPlotResource;

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