/// <summary> /// Called by the base ConnectAction class to determine if the given shapes can be connected. /// </summary> /// <remarks> /// This implementation delegates calls to the ConnectionBuilder OutPortSendsToApplicationBuilder. /// </remarks> public override bool CanCreateConnection(DslDiagrams::ShapeElement sourceShapeElement, DslDiagrams::ShapeElement targetShapeElement, ref string connectionWarning) { if (sourceShapeElement == null) { throw new global::System.ArgumentNullException("sourceShapeElement"); } sourceShapeElement = RemovePassThroughShapes(sourceShapeElement); DslModeling::ModelElement sourceElement = sourceShapeElement.ModelElement; if (sourceElement == null) { sourceElement = sourceShapeElement; } if (targetShapeElement == null) { return(OutPortSendsToApplicationBuilder.CanAcceptSource(sourceElement)); } else { targetShapeElement = RemovePassThroughShapes(targetShapeElement); DslModeling::ModelElement targetElement = targetShapeElement.ModelElement; if (targetElement == null) { targetElement = targetShapeElement; } return(OutPortSendsToApplicationBuilder.CanAcceptSourceAndTarget(sourceElement, targetElement)); } }