public override Sans_Properties_OLifEBuilder EndRelation(Relation_Type entity, Relation_Type reciprocalEntity) { // Relation var clonedEntity = entity.Clone(); ValidateRelationEntity(clonedEntity); clonedEntity.id = _buildRelation.id; clonedEntity.OriginatingObjectID = _buildRelation.OriginatingObjectID; clonedEntity.RelatedObjectID = _buildRelation.RelatedObjectID; clonedEntity.RelationRoleCode = _buildRelation.RelationRoleCode; clonedEntity.RelationDescription = _buildRelation.RelationDescription; AddRelationEntity(clonedEntity); _buildRelation = null; // Reciprocal Relation var clonedReciprocalEntity = reciprocalEntity.Clone(); ValidateRelationEntity(clonedReciprocalEntity); clonedReciprocalEntity.id = _buildReciprocalRelation.id; clonedReciprocalEntity.OriginatingObjectID = _buildReciprocalRelation.OriginatingObjectID; clonedReciprocalEntity.RelatedObjectID = _buildReciprocalRelation.RelatedObjectID; clonedReciprocalEntity.RelationRoleCode = _buildReciprocalRelation.RelationRoleCode; clonedReciprocalEntity.RelationDescription = _buildReciprocalRelation.RelationDescription; AddRelationEntity(clonedReciprocalEntity); _buildReciprocalRelation = null; return(this); }
public override Sans_Properties_OLifEBuilder EndRelation() { AddRelationEntity(_buildRelation.Clone()); if (_buildReciprocalRelation != null) { AddRelationEntity(_buildReciprocalRelation.Clone()); } _buildRelation = null; _buildReciprocalRelation = null; return(this); }