CkAttributeGraph
Namespace: Meshmakers.Octo.ConstructionKit.Contracts.DependencyGraph
Represents an attribute in the dependency graph
public class CkAttributeGraph
Inheritance Object → CkAttributeGraph
Properties
CkAttributeId
Returns the ck attribute id of the attribute.
public CkId<CkAttributeId> CkAttributeId { get; }
Property Value
ValueType
Returns the value type of the attribute.
public AttributeValueTypesDto ValueType { get; }
Property Value
ValueCkRecordId
Defines the record type of the attribute if the value type is a record.
public CkId<CkRecordId> ValueCkRecordId { get; set; }
Property Value
ValueCkEnumId
Defines the enum type of the attribute if the value type is an enum.
public CkId<CkEnumId> ValueCkEnumId { get; set; }
Property Value
DefaultValues
Returns the default values of the attribute.
public ICollection<object> DefaultValues { get; }
Property Value
Ownership
Resolved ownership of the attribute definition (AB#5187): the declared
CkAttributeDto.Ownership, or the deprecated isRuntimeState alias
mapped onto it. Never null — an undeclared attribute resolves to
AttributeOwnershipDto.SeedOwned.
public AttributeOwnershipDto Ownership { get; set; }
Property Value
Remarks:
A AttributeValueTypesDto.Secret attribute is always AttributeOwnershipDto.Secret (AB#5528): the setter coerces any other value, so neither an unset ownership nor a stale cache entry can turn a credential into a seed-owned, exported value. The compiler reports a declared non-Secret ownership on a Secret attribute as an error.
IsRuntimeState
DEPRECATED mirror of CkAttributeGraph.Ownership meaning "preserved on Upsert". Kept for the JSON cache wire format and for consumers that pre-date AB#5187; new code asks CkAttributeGraph.Ownership the specific question it has (AttributeOwnership.IsPreservedOnUpsert(AttributeOwnershipDto) / AttributeOwnership.IsExcludedFromExport(AttributeOwnershipDto)).
public bool IsRuntimeState { get; }
Property Value
Description
An optional description of the attribute
public string Description { get; set; }
Property Value
MetaData
Optional meta data of the attribute
public ICollection<CkAttributeMetaDataDto> MetaData { get; }
Property Value
ICollection<CkAttributeMetaDataDto>
Constructors
CkAttributeGraph(CkId<CkAttributeId>, CkAttributeDto)
Creates a new instance of CkAttributeGraph.
public CkAttributeGraph(CkId<CkAttributeId> ckAttributeId, CkAttributeDto attributeDto)
Parameters
ckAttributeId CkId<CkAttributeId>
attributeDto CkAttributeDto
CkAttributeGraph(CkId<CkAttributeId>, AttributeValueTypesDto, CkId<CkRecordId>, CkId<CkEnumId>, ICollection<Object>, String, ICollection<CkAttributeMetaDataDto>, Boolean)
Serialization constructor Creates a new instance of CkAttributeGraph.
public CkAttributeGraph(CkId<CkAttributeId> ckAttributeId, AttributeValueTypesDto valueType, CkId<CkRecordId> valueCkRecordId, CkId<CkEnumId> valueCkEnumId, ICollection<object> defaultValues, string description, ICollection<CkAttributeMetaDataDto> metaData, bool isRuntimeState)
Parameters
ckAttributeId CkId<CkAttributeId>
valueType AttributeValueTypesDto
valueCkRecordId CkId<CkRecordId>
valueCkEnumId CkId<CkEnumId>
defaultValues ICollection<Object>
description String
An optional description to the attribute
metaData ICollection<CkAttributeMetaDataDto>
Optional meta data of the attribute
isRuntimeState Boolean
DEPRECATED alias for CkAttributeGraph.Ownership, kept so CK caches and callers that pre-date
AB#5187 keep working: it seeds CkAttributeGraph.Ownership (true →
AttributeOwnershipDto.RuntimeState, false →
AttributeOwnershipDto.SeedOwned) and a deserialized ownership key,
when present, then overwrites it.
Trailing + defaulted so existing positional callers (e.g. the mesh-adapter SDK tests
that instantiate CkTypeAttributeGraph / CkAttributeGraph
directly) compile unchanged. STJ binds the constructor by parameter name, so the JSON
wire format is unaffected.