protected override bool CloneRelationship(Diagram diagram, Shape first, Shape second) { TypeBase firstType = first.Entity as TypeBase; InterfaceType secondType = second.Entity as InterfaceType; if (firstType != null && secondType != null) { RealizationRelationship clone = realization.Clone(firstType, secondType); return(diagram.InsertRealization(clone)); } else { return(false); } }
/// <exception cref="ArgumentNullException"> /// <paramref name="realization"/> is null.-or- /// <paramref name="startShape"/> is null.-or- /// <paramref name="endShape"/> is null. /// </exception> public Realization(RealizationRelationship realization, Shape startShape, Shape endShape) : base(realization, startShape, endShape) { this.realization = realization; }
public bool InsertRealization(RealizationRelationship realization) { return(model.InsertRelationship(realization)); }
/// <exception cref="RelationshipException"> /// Cannot create relationship between the two types. /// </exception> /// <exception cref="ArgumentNullException"> /// <paramref name="implementer"/> or <paramref name="baseType"/> is null. /// </exception> public RealizationRelationship AddRealization(TypeBase implementer, InterfaceType baseType) { RealizationRelationship realization = new RealizationRelationship( implementer, baseType); AddRelationship(realization); return realization; }