I'm looking for a method to compare two AF elements and if possible an entire AF Tree.
To clarify I have two AF Database each has a tree that I would like to compare to see if they are the same in terms of name, element template, parent and configuration attributes (attributes marked as configuration item). Looking through the AF SDK help I found three compare methods:
- AFElement.CompareTo - This does a comparison on the Name or ID if the name property doesn't exist
- NumericStringComparer<T>.Compare - Appears to be for sorting
- UniversalComparer<T>.Compare - Appears to be for sorting
The one method would be to recurse throught the trees and perform the check. The other is a variation use the find method on each tree to return a collection and the loop through the two collections then perform the checks. Being fairly lazy I'm hoping that there is a nice method/procedure in the SDK that performs this sort of comparison.