/// <exception cref="ArgumentNullException"> /// <paramref name="first"/> or <paramref name="second"/> is null. /// </exception> public AssociationRelationship AddAssociation(TypeBase first, TypeBase second) { AssociationRelationship association = new AssociationRelationship(first, second); AddAssociation(association); return(association); }
public AssociationRelationship Clone(TypeBase first, TypeBase second) { AssociationRelationship association = new AssociationRelationship(first, second); association.CopyFrom(this); return(association); }
/// <exception cref="ArgumentNullException"> /// <paramref name="first"/> or <paramref name="second"/> is null. /// </exception> public AssociationRelationship AddAggregation(TypeBase first, TypeBase second) { AssociationRelationship aggregation = new AssociationRelationship( first, second, AssociationType.Aggregation); AddAssociation(aggregation); return(aggregation); }
/// <exception cref="ArgumentNullException"> /// <paramref name="first"/> or <paramref name="second"/> is null. /// </exception> public AssociationRelationship AddComposition(TypeBase first, TypeBase second) { AssociationRelationship composition = new AssociationRelationship( first, second, AssociationType.Composition); AddAssociation(composition); return(composition); }
protected override void CopyFrom(Relationship relationship) { base.CopyFrom(relationship); AssociationRelationship association = (AssociationRelationship)relationship; associationType = association.associationType; direction = association.direction; startRole = association.startRole; endRole = association.endRole; startMultiplicity = association.startMultiplicity; endMultiplicity = association.endMultiplicity; }
public bool InsertAssociation(AssociationRelationship associaton) { if (associaton != null && !relationships.Contains(associaton) && entities.Contains(associaton.First) && entities.Contains(associaton.Second)) { AddAssociation(associaton); return(true); } else { return(false); } }
protected virtual void AddAssociation(AssociationRelationship association) { AddRelationship(association); }