Drastic changes to the library to load object information directly from
the assembly. More information is available and the product is cross
compatable with different versions of the revit api
Object inspection via reflection
Snoop / CollectorExts
Removed all modules spare two, the non abstract one which is the main worker of loading information via reflection. In general I felt like it was a lot of code which needed to be specifically typed out in order to get parameters and method values that were already available. The new worker is very simple: when the collect event is called we pass the object to the worker, the worker determines which types the object is associated with and places those in a list. Then we loop through each type and collect properties and methods that meet certain requirements, for each type:
Properties have to have a get method and they can't require any parameters to be passed in.
Methods cannot require any parameters to be passed in and they also can't have a void return type.
We avoid making any changes to the document by invoking the methods in a try statement, and given we are outside of a transaction we catch any error that it would throw due to that. I did a simple (and I mean simple) check of what parameters we have already seen so that we don't continue to log duplicate information in the snoop dialog. I considered leaving all the properties and methods in for every type but it made the list of information very long and I wasn't sure how much I benefited from showing all that information.
Certain specific properties and methods that I wanted, such as element geometry and boundary segments, I had to add on a case by case basis but even this is much more efficient because we still don't require separate methods for each type. We can continue to update the list of specific properties and methods that have parameter inputs as an ongoing work.
I thinned out the Utils class to remove anything that we no longer needed. The changes here were minor.
I had to remove the vast majority of the tests given they were no longer required and more importantly the methods that they called no longer existed.
merged pull request #22 from awmcc90 drastic changes implementing obj…
…ect inspection via reflection and cross-version compatibility