CkRecordGraph
Namespace: Meshmakers.Octo.ConstructionKit.Contracts.DependencyGraph
Represents a construction kit record in the dependency graph
public class CkRecordGraph : CkTypeWithAttributesGraph
Inheritance Object → CkTypeWithAttributesGraph → CkRecordGraph
Properties
DerivedFromCkRecordId
Defines the base record of this record.
public CkId<CkRecordId> DerivedFromCkRecordId { get; }
Property Value
CkRecordId
Gets or sets the construction kit id
public CkId<CkRecordId> CkRecordId { get; }
Property Value
IsFinal
If true, the type cannot be inherited again
public bool IsFinal { get; }
Property Value
IsAbstract
If true, the type cannot be instantiated by a runtime entity
public bool IsAbstract { get; }
Property Value
BaseRecords
Returns a list of base records of the give construction kit record
public IReadOnlyCollection<CkGraphRecordInheritance> BaseRecords { get; }
Property Value
IReadOnlyCollection<CkGraphRecordInheritance>
DerivedRecords
Returns a list of derived records of the given construction kit record
public IReadOnlyCollection<CkGraphRecordInheritance> DerivedRecords { get; }
Property Value
IReadOnlyCollection<CkGraphRecordInheritance>
Description
An optional description of the record
public string Description { get; set; }
Property Value
RecordKey
Effective record key (AB#5528, concept §4.6): the name of the sub-attribute that
identifies an element of this record inside a record array - declared on this record or
inherited from the nearest base record that declares one. null when no record in
the chain declares a key. Used to carry secret sub-values over per element when a record
array is replaced (write path, AB#5532).
public string RecordKey { get; set; }
Property Value
Remarks:
Deliberately a settable property instead of a constructor parameter: a CK cache written
by an older engine has no recordKey and keeps null; System.Text.Json applies
the setter after the constructor.
Path
Returns a string that describes the inheritance chain
public string Path { get; }
Property Value
DefinedAttributes
Gets or sets a list of attributes that are defined by the current type
public IReadOnlyCollection<CkTypeAttributeDto> DefinedAttributes { get; }
Property Value
IReadOnlyCollection<CkTypeAttributeDto>
AllAttributes
Gets or sets a list of attributes including inherited ones.
public IReadOnlyDictionary<CkId<CkAttributeId>, CkTypeAttributeGraph> AllAttributes { get; }
Property Value
IReadOnlyDictionary<CkId<CkAttributeId>, CkTypeAttributeGraph>
AllAttributesByName
Gets or sets a list of attributes including inherited ones.
public IReadOnlyDictionary<string, CkTypeAttributeGraph> AllAttributesByName { get; }
Property Value
IReadOnlyDictionary<String, CkTypeAttributeGraph>
Constructors
CkRecordGraph(CkId<CkRecordId>, CkRecordDto)
Creates a new instance of CkRecordGraph.
public CkRecordGraph(CkId<CkRecordId> ckRecordId, CkRecordDto ckRecordDto)
Parameters
ckRecordId CkId<CkRecordId>
ckRecordDto CkRecordDto
CkRecordGraph(CkId<CkRecordId>, Boolean, Boolean, IReadOnlyCollection<CkGraphRecordInheritance>, CkId<CkRecordId>, IReadOnlyCollection<CkGraphRecordInheritance>, IReadOnlyCollection<CkTypeAttributeDto>, IReadOnlyDictionary<CkId<CkAttributeId>, CkTypeAttributeGraph>, String)
Creates a new instance of CkRecordGraph.
public CkRecordGraph(CkId<CkRecordId> ckRecordId, bool isAbstract, bool isFinal, IReadOnlyCollection<CkGraphRecordInheritance> baseRecords, CkId<CkRecordId> derivedFromCkRecordId, IReadOnlyCollection<CkGraphRecordInheritance> derivedRecords, IReadOnlyCollection<CkTypeAttributeDto> definedAttributes, IReadOnlyDictionary<CkId<CkAttributeId>, CkTypeAttributeGraph> allAttributes, string description)
Parameters
ckRecordId CkId<CkRecordId>
isAbstract Boolean
isFinal Boolean
baseRecords IReadOnlyCollection<CkGraphRecordInheritance>
derivedFromCkRecordId CkId<CkRecordId>
derivedRecords IReadOnlyCollection<CkGraphRecordInheritance>
definedAttributes IReadOnlyCollection<CkTypeAttributeDto>
allAttributes IReadOnlyDictionary<CkId<CkAttributeId>, CkTypeAttributeGraph>
description String
Methods
InheritRecordKey(String)
Fills an empty record key from a base record. Nearest-wins: a key already set (declared on this record or inherited from a nearer base) is never overwritten.
internal void InheritRecordKey(string baseRecordKey)
Parameters
baseRecordKey String
AddBaseRecords(IEnumerable<CkGraphRecordInheritance>)
Adds a list of base records of the current record
internal void AddBaseRecords(IEnumerable<CkGraphRecordInheritance> baseRecordList)
Parameters
baseRecordList IEnumerable<CkGraphRecordInheritance>
AddDerivedRecords(CkGraphRecordInheritance)
Adds a list of derived records of the current record
internal void AddDerivedRecords(CkGraphRecordInheritance ckGraphRecordInheritance)
Parameters
ckGraphRecordInheritance CkGraphRecordInheritance
GetAllDerivedRecords(Boolean)
Returns a list of derived records of the given construction kit record
public IReadOnlyCollection<CkId<CkRecordId>> GetAllDerivedRecords(bool includeSelf)
Parameters
includeSelf Boolean
When true, the current record is included to the list
Returns
IReadOnlyCollection<CkId<CkRecordId>>
GetBaseTypes(Boolean)
Returns a list of base records of the given construction kit record
public IReadOnlyCollection<CkId<CkRecordId>> GetBaseTypes(bool includeSelf)
Parameters
includeSelf Boolean
When true, the current record is included to the list
Returns
IReadOnlyCollection<CkId<CkRecordId>>
ToString()
public string ToString()