Click or drag to resize

ElementHelpers Methods

The ElementHelpers type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAreEqual
A standard method for determining if two elements are equal. This method should be used by any Element.equals() implementation to ensure consistent behavior.
Public methodStatic memberCopyProperties
Copy the properties (key and value) from one element to another. The properties are preserved on the from element. ElementPropertiesRule that share the same key on the to element are overwritten.
Public methodStatic memberGetProperties
Get a clone of the properties of the provided element. In other words, a HashMap is created and filled with the key/values of the element's properties.
Public methodStatic memberHaveEqualIds
Simply tests if the element ids are equal().
Public methodStatic memberHaveEqualProperties
Determines whether two elements have the same properties. To be true, both must have the same property keys and respective values must be equals().
Public methodStatic memberRemoveProperties
Clear all the properties from an IEnumerable of elements.
Public methodStatic memberRemoveProperty
Remove a property from all elements in the provided IEnumerable.
Public methodStatic memberRenameProperty
Renames a property by removing the old key and adding the stored value to the new key. If property does not exist, nothing occurs.
Public methodStatic memberSetProperties(IElement, IDictionaryString, Object)
Set the properties of the provided element using the provided dictionary.
Public methodStatic memberSetProperties(IElement, Object)
Set the properties of the provided element using the provided key value pairs. The var args of Objects must be divisible by 2. All odd elements in the array must be a string key.
Public methodStatic memberTypecastProperty
Typecasts a property value. This only works for casting to a class that has a constructor of the for new X(string). If no such constructor exists, an Exception is thrown and the original element property is left unchanged.
Public methodStatic memberValidateProperty
Determines whether the property key/value for the specified element can be legally set. This is typically used as a pre-condition check prior to setting a property. Throws ArgumentException whether the triple is legal and if not, a clear reason message is provided
Top
See Also