/// <summary>
            /// Called by the base ConnectAction class to create the underlying relationship.
            /// </summary>
            /// <remarks>
            /// This implementation delegates calls to the ConnectionBuilder SocketUseReferencesSocketBuilder.
            /// </remarks>
            public override void CreateConnection(DslDiagrams::ShapeElement sourceShapeElement, DslDiagrams::ShapeElement targetShapeElement, DslDiagrams::PaintFeedbackArgs paintFeedbackArgs)
            {
                if (sourceShapeElement == null)
                {
                    throw new global::System.ArgumentNullException("sourceShapeElement");
                }
                if (targetShapeElement == null)
                {
                    throw new global::System.ArgumentNullException("targetShapeElement");
                }

                sourceShapeElement = RemovePassThroughShapes(sourceShapeElement);
                targetShapeElement = RemovePassThroughShapes(targetShapeElement);

                DslModeling::ModelElement sourceElement = sourceShapeElement.ModelElement;

                if (sourceElement == null)
                {
                    sourceElement = sourceShapeElement;
                }
                DslModeling::ModelElement targetElement = targetShapeElement.ModelElement;

                if (targetElement == null)
                {
                    targetElement = targetShapeElement;
                }
                // You will need to implement a method with the following signature:
                // public static void Connect(DslModeling::ModelElement sourceElement, DslModeling::ModelElement targetElement)
                // {
                // }
                // in a partial class of SocketUseReferencesSocketBuilder.
                SocketUseReferencesSocketBuilder.Connect(sourceElement, targetElement);
            }
Example #2
0
            /// <summary>
            /// Called by the base ConnectAction class to create the underlying relationship.
            /// </summary>
            /// <remarks>
            /// This implementation delegates calls to the ConnectionBuilder EntidadReferencesRelacionedBuilder.
            /// </remarks>
            public override void CreateConnection(DslDiagrams::ShapeElement sourceShapeElement, DslDiagrams::ShapeElement targetShapeElement, DslDiagrams::PaintFeedbackArgs paintFeedbackArgs)
            {
                if (sourceShapeElement == null)
                {
                    throw new global::System.ArgumentNullException("sourceShapeElement");
                }
                if (targetShapeElement == null)
                {
                    throw new global::System.ArgumentNullException("targetShapeElement");
                }

                sourceShapeElement = RemovePassThroughShapes(sourceShapeElement);
                targetShapeElement = RemovePassThroughShapes(targetShapeElement);

                DslModeling::ModelElement sourceElement = sourceShapeElement.ModelElement;

                if (sourceElement == null)
                {
                    sourceElement = sourceShapeElement;
                }
                DslModeling::ModelElement targetElement = targetShapeElement.ModelElement;

                if (targetElement == null)
                {
                    targetElement = targetShapeElement;
                }
                EntidadReferencesRelacionedBuilder.Connect(sourceElement, targetElement);
            }
            /// <summary>
            /// Called by the base ConnectAction class to create the underlying relationship.
            /// </summary>
            /// <remarks>
            /// This implementation delegates calls to the ConnectionBuilder InheritanceBuilder.
            /// </remarks>
            public override void CreateConnection(DslDiagrams::ShapeElement sourceShapeElement, DslDiagrams::ShapeElement targetShapeElement, DslDiagrams::PaintFeedbackArgs paintFeedbackArgs)
            {
                if (sourceShapeElement == null)
                {
                    throw new global::System.ArgumentNullException("sourceShapeElement");
                }
                if (targetShapeElement == null)
                {
                    throw new global::System.ArgumentNullException("targetShapeElement");
                }

                sourceShapeElement = RemovePassThroughShapes(sourceShapeElement);
                targetShapeElement = RemovePassThroughShapes(targetShapeElement);

                DslModeling::ModelElement sourceElement = sourceShapeElement.ModelElement;

                if (sourceElement == null)
                {
                    sourceElement = sourceShapeElement;
                }
                DslModeling::ModelElement targetElement = targetShapeElement.ModelElement;

                if (targetElement == null)
                {
                    targetElement = targetShapeElement;
                }
                // The InheritanceTool connection tool specifies that source and target should be reversed.
                InheritanceBuilder.Connect(targetElement, sourceElement);
            }