IEnumerable <AvailableRelationship> GetAvailableRelationships(DirectionalRelationship relationship) { return(new[] { new AvailableRelationship { RelationshipIdentity = relationship.GetIdentity(), Participant = RelationshipParticipant.Primary, Summary = relationship.PrimarySummary, }, new AvailableRelationship { RelationshipIdentity = relationship.GetIdentity(), Participant = RelationshipParticipant.Secondary, Summary = relationship.SecondarySummary, }, }); }
public void Visit(DirectionalRelationship relationship) { switch (desiredRelationship) { case RelationshipParticipant.Primary: summary = relationship?.PrimarySummary; break; case RelationshipParticipant.Secondary: summary = relationship?.SecondarySummary; break; default: summary = null; break; } }