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
parentIModelElementthe parent model element
childIModelElementthe 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
otherModelTreeItemAn 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
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand 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
leftModelTreeItemrightModelTreeItem
Returns
operator !=(ModelTreeItem, ModelTreeItem)
public static bool operator !=(ModelTreeItem left, ModelTreeItem right)
Parameters
leftModelTreeItemrightModelTreeItem