/// <summary> /// Constructs a new instance. /// </summary> /// <param name="actionHandle"></param> public ElementAction(ActionHandle actionHandle) { if (actionHandle == null) { throw new ArgumentNullException("actionHandle"); } _actionHandle = actionHandle; }
/// <exclude /> public bool Equals(ActionHandle actionHandle) { if (actionHandle == null) { return(false); } return(this.SerializedActionToken == actionHandle.SerializedActionToken); }
public static void ExecuteElementAction(ElementHandle elementHandle, ActionHandle actionHandle, string consoleId) { FlowControllerServicesContainer flowServicesContainer = new FlowControllerServicesContainer(); flowServicesContainer.AddService(new ManagementConsoleMessageService(consoleId)); flowServicesContainer.AddService(new ElementDataExchangeService(elementHandle.ProviderName)); flowServicesContainer.AddService(new ActionExecutionService(elementHandle.ProviderName, consoleId)); flowServicesContainer.AddService(new ElementInformationService(elementHandle)); FlowToken flowToken = ActionExecutorFacade.Execute(elementHandle.EntityToken, actionHandle.ActionToken, flowServicesContainer); IFlowUiDefinition uiDefinition = FlowControllerFacade.GetCurrentUiDefinition(flowToken, flowServicesContainer); if (typeof(FlowUiDefinitionBase).IsAssignableFrom(uiDefinition.GetType())) { string serializedEntityToken = EntityTokenSerializer.Serialize(elementHandle.EntityToken, true); ViewTransitionHelper.HandleNew(consoleId, elementHandle.ProviderName, serializedEntityToken, flowToken, (FlowUiDefinitionBase)uiDefinition); } }
/// <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); } }
/// <exclude /> public bool Equals(ActionHandle actionHandle) { if (actionHandle == null) return false; return this.SerializedActionToken == actionHandle.SerializedActionToken; }
/// <summary> /// Constructs a new instance. /// </summary> /// <param name="actionHandle"></param> public ElementAction(ActionHandle actionHandle) { Verify.ArgumentNotNull(actionHandle, nameof(actionHandle)); ActionHandle = actionHandle; }
/// <summary> /// Constructs a new instance. /// </summary> /// <param name="actionHandle"></param> public ElementAction(ActionHandle actionHandle) { if (actionHandle == null) throw new ArgumentNullException("actionHandle"); _actionHandle = actionHandle; }