Ejemplo n.º 1
0
 protected override bool CloneRelationship(Diagram diagram, Shape first, Shape second)
 {
     if (first.Entity is CompositeType firstType && second.Entity is TypeBase secondType)
     {
         NestingRelationship clone = NestingRelationship.Clone(firstType, secondType);
         return(diagram.InsertNesting(clone));
     }
Ejemplo n.º 2
0
        protected override bool CloneRelationship(Diagram diagram, Shape first, Shape second)
        {
            var firstType  = first.Entity as CompositeType;
            var secondType = second.Entity as TypeBase;

            if (firstType != null && secondType != null)
            {
                var clone = NestingRelationship.Clone(firstType, secondType);
                return(diagram.InsertNesting(clone));
            }
            return(false);
        }
Ejemplo n.º 3
0
        protected override bool CloneRelationship(IDiagram diagram, Shape first, Shape second)
        {
            if (diagram.DiagramType != DiagramType.ClassDiagram)
            {
                return(false);
            }

            CompositeType firstType  = first.Entity as CompositeType;
            TypeBase      secondType = second.Entity as TypeBase;

            if (firstType != null && secondType != null)
            {
                NestingRelationship clone = nesting.Clone(firstType, secondType);
                return(((ClassDiagram)diagram).InsertNesting(clone));
            }
            else
            {
                return(false);
            }
        }