Class Repair
A repair.
[DataContract(IsReference = true)]
[KnownType(typeof(Repair))]
public class Repair
- Inheritance
-
Repair
- Inherited Members
Constructors
Repair(int, string, Repair?)
Initializes a new instance of the Repair class.
public Repair(int repairId, string name, Repair? parentRepair)
Parameters
repairIdintThe unique identifier for this repair.
namestringThe repair name.
parentRepairRepairThe parent repair, or null if this is a top-level repair.
Exceptions
- ArgumentNullException
nameis null.
Properties
FullName
Gets the full name of the repair, as the individual parts separated by underscores.
public string FullName { get; }
Property Value
Remarks
This property value is derived from the Name of this repair and each parent repair up through the hierarchy.
Name
Gets the repair name.
[DataMember]
public string Name { get; }
Property Value
ParentRepair
Gets the parent repair, or null if this is a top-level repair.
[DataMember]
public Repair? ParentRepair { get; }
Property Value
RepairId
Gets the unique identifier for this repair.
[DataMember]
public int RepairId { get; }
Property Value
Methods
EnumerateAncestors()
Enumerates the sequence of repair nodes including each ancestor of this node, up to the root of the repair hierarchy. This node is not included in the enumeration.
public IEnumerable<Repair> EnumerateAncestors()
Returns
- IEnumerable<Repair>
An enumerable of Repair.
EnumerateThisAndAncestors()
Enumerates the sequence of repair nodes including this repair and each ancestor up to the root of the repair hierarchy.
public IEnumerable<Repair> EnumerateThisAndAncestors()
Returns
- IEnumerable<Repair>
An enumerable of Repair.
IsDescendedFrom(Repair)
Determines whether this repair is a descendant of another.
public bool IsDescendedFrom(Repair other)
Parameters
otherRepairA repair.
Returns
Exceptions
- ArgumentNullException
otheris null.
ToString()
Returns the FullName value as a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.