public async void AddMethodCallExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            AddConnectionDialog addConnectionDialog = new AddConnectionDialog(graphSource, AddConnectionDialog.CreationMode.MethodCall);

            if (addConnectionDialog.ShowDialog() == true)
            {
                await AddMethodCall(addConnectionDialog.DataElement, addConnectionDialog.ConnectionName);
            }
        }
        private async Task CreateConnection_OnDrop(DragEventArgs e, AddConnectionDialog.CreationMode creationMode,
                                                   CreateConnectionCommand createConnectionCommand)
        {
            EntityData draggedData = e.Data.GetData(typeof(EntityData)) as EntityData;
            EntityData currentData = GetCurrentItemData();

            if (draggedData != null && currentData != null)
            {
                // show the dialog to choose which method to add a call to
                AddConnectionDialog addConnectionDialog = new AddConnectionDialog(graphSource, creationMode);
                // select the dragged item
                addConnectionDialog.Preselect(draggedData);
                if (addConnectionDialog.ShowDialog() == true)
                {
                    await createConnectionCommand(addConnectionDialog.DataElement, addConnectionDialog.ConnectionName);
                }
            }
        }