Struct ModelTreeItem
Denotes a pair of a model element and its parent
public readonly struct ModelTreeItem : IEquatable<ModelTreeItem>
- Implements
- Inherited Members
Constructors
ModelTreeItem(IModelElement, IModelElement)
Creates a new pair
public ModelTreeItem(IModelElement parent, IModelElement child)
Parameters
parent
IModelElementthe parent model element
child
IModelElementthe child model element
Properties
Child
Gets the child model element
public IModelElement Child { get; }
Property Value
Parent
Gets the parent model element
public IModelElement Parent { get; }
Property Value
Methods
Equals(ModelTreeItem)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ModelTreeItem other)
Parameters
other
ModelTreeItemAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Operators
operator ==(ModelTreeItem, ModelTreeItem)
public static bool operator ==(ModelTreeItem left, ModelTreeItem right)
Parameters
left
ModelTreeItemright
ModelTreeItem
Returns
operator !=(ModelTreeItem, ModelTreeItem)
public static bool operator !=(ModelTreeItem left, ModelTreeItem right)
Parameters
left
ModelTreeItemright
ModelTreeItem