예제 #1
0
        public void Collect(XmlNode node)
        {
            MDataObjs.Clear();
            Stream(node);

            // now that we've collected all the data that we know about,
            // fire an event to any registered Snoop Collector Extensions so
            // they can add their data
            //FireEvent_CollectExt(node);	// shouldn't be anyone else, we've taken care of it all
        }
예제 #2
0
        /// <summary>
        ///     This is the point where the ball starts rolling.  We'll walk down the object's class hierarchy,
        ///     continually trying to cast it to objects we know about.  NOTE: this is intentionally not Reflection.
        ///     We can do that elsewhere, but here we want to explicitly control how data is formatted and navigated,
        ///     so we will manually walk the entire hierarchy.
        /// </summary>
        /// <param name="obj">Object to collect data for</param>
        public Task Collect(object obj)
        {
            MDataObjs.Clear();

            if (obj == null)
            {
                return(Task.CompletedTask);
            }

            return(ExternalExecutor.ExecuteInRevitContextAsync(app => Collect(app, SourceDocument, this, obj)));
        }