protected override void Export(ISystemContext context, Node node)
{
base.Export(context, node);
if (this.Parent != null)
{
NodeId referenceTypeId = this.ReferenceTypeId;
if (NodeId.IsNull(referenceTypeId))
{
referenceTypeId = ReferenceTypeIds.HasComponent;
}
node.ReferenceTable.Add(referenceTypeId, true, this.Parent.NodeId);
}
if (!NodeId.IsNull(this.TypeDefinitionId))
{
node.ReferenceTable.Add(ReferenceTypeIds.HasTypeDefinition, false, this.TypeDefinitionId);
}
if (!NodeId.IsNull(this.ModellingRuleId))
{
node.ReferenceTable.Add(ReferenceTypeIds.HasModellingRule, false, this.ModellingRuleId);
}
}