src/Misc/EFTools/EntityDesignEntityDesigner/GeneratedCode/ConnectionBuilders.cs
/// <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 AssociationBuilder.
/// </remarks>
Called by the base ConnectAction class to determine if the given shapes can be connected.
Called by the base ConnectAction class to determine if the given shapes can be connected .
public override bool CanCreateConnection(DslDiagrams::ShapeElement sourceShapeElement, DslDiagrams::ShapeElement targetShapeElement, ref string connectionWarning)
			{
				bool canConnect = true;
				if(sourceShapeElement == null) throw new global::System.ArgumentNullException("sourceShapeElement");
				sourceShapeElement = RemovePassThroughShapes(sourceShapeElement);
				DslModeling::ModelElement sourceElement = sourceShapeElement.ModelElement;
				if(sourceElement == null) sourceElement = sourceShapeElement;
				DslModeling::ModelElement targetElement = null;
				if (targetShapeElement != null)
				{
					targetShapeElement = RemovePassThroughShapes(targetShapeElement);
					targetElement = targetShapeElement.ModelElement;
					if(targetElement == null) targetElement = targetShapeElement;
				}
				canConnect = base.CanCreateConnection(sourceShapeElement, targetShapeElement, ref connectionWarning);
				if (canConnect)
				{				
					if(targetShapeElement == null)
					{
						return AssociationBuilder.CanAcceptSource(sourceElement);
					}
					else
					{				
						return AssociationBuilder.CanAcceptSourceAndTarget(sourceElement, targetElement);
					}
				}
				else
				{
					return canConnect;
				}
			}
public override bool CanCreateConnection ( DslDiagrams :: ShapeElement sourceShapeElement , DslDiagrams :: ShapeElement targetShapeElement , ref string connectionWarning ) { bool canConnect = true ; if ( sourceShapeElement == null ) throw new global :: System . ArgumentNullException ( " " ) ; sourceShapeElement = RemovePassThroughShapes ( sourceShapeElement ) ; DslModeling :: ModelElement sourceElement = sourceShapeElement . ModelElement ; if ( sourceElement == null ) sourceElement = sourceShapeElement ; DslModeling :: ModelElement targetElement = null ; if ( targetShapeElement != null ) { targetShapeElement = RemovePassThroughShapes ( targetShapeElement ) ; targetElement = targetShapeElement . ModelElement ; if ( targetElement == null ) targetElement = targetShapeElement ; } canConnect = base . CanCreateConnection ( sourceShapeElement , targetShapeElement , ref connectionWarning ) ; if ( canConnect ) { if ( targetShapeElement == null ) { return AssociationBuilder . CanAcceptSource ( sourceElement ) ; } else { return AssociationBuilder . CanAcceptSourceAndTarget ( sourceElement , targetElement ) ; } } else { return canConnect ; } }
Called by the base ConnectAction class to determine if the given shapes can be connected.
Called by the base ConnectAction class to determine if the given shapes can be connected .
// base.CanCreateConnection must be called to check whether existing Locks prevent this link from getting created.	 //return false
sourceShapeElement
DslDiagrams::ShapeElement
targetShapeElement
DslDiagrams::ShapeElement
string
ref
remarks
This implementation delegates calls to the ConnectionBuilder AssociationBuilder.
This implementation delegates calls to the ConnectionBuilder AssociationBuilder .