public override void DetachAll() { StartConnectedShape.IfNotNull(el => el.Connections.RemoveAll(c => c.ToElement == this)); EndConnectedShape.IfNotNull(el => el.Connections.RemoveAll(c => c.ToElement == this)); StartConnectedShape = null; EndConnectedShape = null; }
public override void DisconnectShapeFromConnector(GripType gt) { (gt.In(startGrips)).IfElse( () => StartConnectedShape.IfNotNull(el => el.Connections.RemoveAll(c => c.ToElement == this)), // If () => EndConnectedShape.IfNotNull(el => el.Connections.RemoveAll(c => c.ToElement == this))); // Else }