protected override bool CloneRelationship(Diagram diagram, Shape first, Shape second) { if (first.Entity is TypeBase firstType && second.Entity is TypeBase secondType) { DependencyRelationship clone = DependencyRelationship.Clone(firstType, secondType); return(diagram.InsertDependency(clone)); }
protected override bool CloneRelationship(Diagram diagram, Shape first, Shape second) { var firstType = first.Entity as TypeBase; var secondType = second.Entity as TypeBase; if (firstType != null && secondType != null) { var clone = DependencyRelationship.Clone(firstType, secondType); return(diagram.InsertDependency(clone)); } return(false); }
protected override bool CloneRelationship(IDiagram diagram, Shape first, Shape second) { if (diagram.DiagramType != DiagramType.ClassDiagram) { return(false); } TypeBase firstType = first.Entity as TypeBase; TypeBase secondType = second.Entity as TypeBase; if (firstType != null && secondType != null) { DependencyRelationship clone = dependency.Clone(firstType, secondType); return(((ClassDiagram)diagram).InsertDependency(clone)); } else { return(false); } }