ElementHelpers Class |
[Missing <summary> documentation for "T:VelocityGraph.Frontenac.Blueprints.Util.ElementHelpers"]
Namespace: VelocityGraph.Frontenac.Blueprints.Util
The ElementHelpers type exposes the following members.
Name | Description | |
---|---|---|
AreEqual |
A standard method for determining if two elements are equal.
This method should be used by any Element.equals() implementation to ensure consistent behavior.
| |
CopyProperties |
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.
| |
GetProperties |
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.
| |
HaveEqualIds |
Simply tests if the element ids are equal().
| |
HaveEqualProperties |
Determines whether two elements have the same properties.
To be true, both must have the same property keys and respective values must be equals().
| |
RemoveProperties |
Clear all the properties from an IEnumerable of elements.
| |
RemoveProperty |
Remove a property from all elements in the provided IEnumerable.
| |
RenameProperty |
Renames a property by removing the old key and adding the stored value to the new key.
If property does not exist, nothing occurs.
| |
SetProperties(IElement, IDictionaryString, Object) |
Set the properties of the provided element using the provided dictionary.
| |
SetProperties(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.
| |
TypecastProperty |
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.
| |
ValidateProperty |
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
|