Ejemplo n.º 1
0
        public virtual T Execute(CommandContext commandContext)
        {
            EnsureUtil.EnsureNotNull("executionId", ExecutionId);
            EnsureUtil.EnsureNotNull("variableName", VariableName);

            ExecutionEntity execution = commandContext.ExecutionManager.FindExecutionById(ExecutionId);

            EnsureUtil.EnsureNotNull("execution " + ExecutionId + " doesn't exist", "execution", execution);

            CheckGetExecutionVariableTyped(execution, commandContext);

            T value;

            if (IsLocal)
            {
                value = execution.GetVariableLocalTyped <T>(VariableName, DeserializeValue);
            }
            else
            {
                value = execution.GetVariableTyped <T>(VariableName, DeserializeValue);
            }

            return(value);
        }