Class Defect
A defect.
[DataContract(IsReference = true)]
[KnownType(typeof(Defect))]
public class Defect
- Inheritance
-
Defect
- Inherited Members
Constructors
Defect(int, string, Defect?)
Initializes a new instance of the Defect class.
public Defect(int defectId, string name, Defect? parentDefect)
Parameters
defectIdintThe unique identifier for this defect.
namestringThe defect name.
parentDefectDefectThe parent defect, or null if this is a top-level defect.
Exceptions
- ArgumentNullException
nameis null.
Fields
PathSeparator
The separator to use when constructing defect and repair paths for display.
public const string PathSeparator = "_"
Field Value
Properties
DefectId
Gets the unique identifier for this defect.
[DataMember]
public int DefectId { get; }
Property Value
FullName
Gets the full name of the defect, as the individual parts separated by underscores.
public string FullName { get; }
Property Value
Remarks
This property value is derived from the Name of this defect and each parent defect up through the hierarchy.
Name
Gets the defect name.
[DataMember]
public string Name { get; }
Property Value
ParentDefect
Gets the parent defect, or null if this is a top-level defect.
[DataMember]
public Defect? ParentDefect { get; }
Property Value
Methods
EnumerateAncestors()
Enumerates the sequence of defect nodes including each ancestor of this node, up to the root of the defect hierarchy. This node is not included in the enumeration.
public IEnumerable<Defect> EnumerateAncestors()
Returns
- IEnumerable<Defect>
An enumerable of Defect.
EnumerateThisAndAncestors()
Enumerates the sequence of defect nodes including this defect and each ancestor up to the root of the defect hierarchy.
public IEnumerable<Defect> EnumerateThisAndAncestors()
Returns
- IEnumerable<Defect>
An enumerable of Defect.
IsDescendedFrom(Defect)
Determines whether this defect is a descendant of another.
public bool IsDescendedFrom(Defect other)
Parameters
otherDefectA defect.
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.