public static void ExecuteElementAction(ElementHandle elementHandle, ActionHandle actionHandle, string consoleId) { var flowServicesContainer = new FlowControllerServicesContainer( new ManagementConsoleMessageService(consoleId), new ElementDataExchangeService(elementHandle.ProviderName), new ActionExecutionService(elementHandle.ProviderName, consoleId), new ElementInformationService(elementHandle) ); FlowToken flowToken = ActionExecutorFacade.Execute(elementHandle.EntityToken, actionHandle.ActionToken, flowServicesContainer); IFlowUiDefinition uiDefinition = FlowControllerFacade.GetCurrentUiDefinition(flowToken, flowServicesContainer); if (uiDefinition is FlowUiDefinitionBase flowUiDefinition) { string serializedEntityToken = EntityTokenSerializer.Serialize(elementHandle.EntityToken, true); ViewTransitionHelper.HandleNew(consoleId, elementHandle.ProviderName, serializedEntityToken, flowToken, flowUiDefinition); } }
/// <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); } }
public void RunActionAsync(ActionHandle action) => Push(action);