Esempio n. 1
0
        /// <exclude />
        public static bool ExecuteElementDraggedAndDropped(string draggedElementProviderName, string draggedElementSerializedEntityToken, string draggedElementPiggybag, string newParentElementProviderName, string newParentElementSerializedEntityToken, string newParentElementPiggybag, int dropIndex, string consoleId, bool isCopy)
        {
            if (draggedElementProviderName != newParentElementProviderName)
            {
                throw new InvalidOperationException("Only drag'n'drop internal in element providers are allowed");
            }

            EntityToken   draggedElementEntityToken = EntityTokenSerializer.Deserialize(draggedElementSerializedEntityToken);
            ElementHandle draggedElementHandle      = new ElementHandle(draggedElementProviderName, draggedElementEntityToken, draggedElementPiggybag);

            EntityToken   newParentElementEntityToken = EntityTokenSerializer.Deserialize(newParentElementSerializedEntityToken);
            ElementHandle newParentdElementHandle     = new ElementHandle(newParentElementProviderName, newParentElementEntityToken, newParentElementPiggybag);

            return(ActionExecutionMediator.ExecuteElementDraggedAndDropped(draggedElementHandle, newParentdElementHandle, dropIndex, consoleId, isCopy));
        }
Esempio n. 2
0
        /// <exclude />
        public static void ExecuteElementAction(string providerName, string serializedEntityToken, string piggybag, string serializedActionToken, string consoleId)
        {
            using (DebugLoggingScope.MethodInfoScope)
            {
                EntityToken entityToken = EntityTokenSerializer.Deserialize(serializedEntityToken);
                if (!entityToken.IsValid())
                {
                    ShowInvalidEntityMessage(consoleId);
                    return;
                }

                var elementHandle = new ElementHandle(providerName, entityToken, piggybag);

                ActionToken  actionToken  = ActionTokenSerializer.Deserialize(serializedActionToken, true);
                ActionHandle actionHandle = new ActionHandle(actionToken);

                ActionExecutionMediator.ExecuteElementAction(elementHandle, actionHandle, consoleId);
            }
        }