Table of Contents

Class Defect

Namespace
Acuit.Pinpoint.Services.Entities
Assembly
Acuit.Pinpoint.Services.Entities.dll

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

defectId int

The unique identifier for this defect.

name string

The defect name.

parentDefect Defect

The parent defect, or null if this is a top-level defect.

Exceptions

ArgumentNullException

name is null.

Fields

PathSeparator

The separator to use when constructing defect and repair paths for display.

public const string PathSeparator = "_"

Field Value

string

Properties

DefectId

Gets the unique identifier for this defect.

[DataMember]
public int DefectId { get; }

Property Value

int

FullName

Gets the full name of the defect, as the individual parts separated by underscores.

public string FullName { get; }

Property Value

string

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

string

ParentDefect

Gets the parent defect, or null if this is a top-level defect.

[DataMember]
public Defect? ParentDefect { get; }

Property Value

Defect

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

other Defect

A defect.

Returns

bool

true if this defect is a descendant of other.

Exceptions

ArgumentNullException

other is 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.