PublishOutput() публичный Метод

public PublishOutput ( ) : void
Результат void
Пример #1
0
        public bool Execute()
        {
            TaskEngine taskEngine;

            LogTaskStarted();
            ITask task;

            try {
                task = InitializeTask();
            } catch (Exception e) {
                LogError("Error initializing task {0}: {1}", taskElement.LocalName, e.Message);
                LogMessage(MessageImportance.Low, "Error initializing task {0}: {1}",
                           taskElement.LocalName, e.ToString());
                return(false);
            }

            try {
                taskEngine = new TaskEngine(parentTarget.Project, task, Type);
                taskEngine.Prepare(GetParameters());
                var result = taskEngine.Execute();
                if (result)
                {
                    taskEngine.PublishOutput(taskElement, taskEngine.ValueFromExecution);
                }

                LogTaskFinished(result);
                return(result);
            } catch (Exception e) {
                task_logger.LogError("Error executing task {0}: {1}", taskElement.LocalName, e.Message);
                task_logger.LogMessage(MessageImportance.Low,
                                       "Error executing task {0}: {1}", taskElement.LocalName, e.ToString());
                return(false);
            }
        }
Пример #2
0
        bool IBuildTask.ResolveOutputItems()
        {
            var taskEngine = new TaskEngine(parentTarget.Project, null, Type);

            taskEngine.PublishOutput(taskElement, l => {
                var pv = GetParameterValue(l.Name);

                Expression exp = new Expression();
                exp.Parse(pv, ParseOptions.AllowItemsNoMetadataAndSplit);
                return(exp.ConvertTo(parentTarget.Project, l.PropertyType));
            });

            return(true);
        }
Пример #3
0
        public bool Execute()
        {
            bool       result = false;
            TaskEngine taskEngine;

            LogTaskStarted();
            ITask task = null;

            try
            {
                try
                {
                    task = InitializeTask();
                }
                catch (Exception e)
                {
                    LogError("Error initializing task {0}: {1}", taskElement.LocalName, e.Message);
                    LogMessage(MessageImportance.Low, "Error initializing task {0}: {1}",
                               taskElement.LocalName, e.ToString());
                    return(false);
                }

                try
                {
                    taskEngine = new TaskEngine(parentTarget.Project);
                    taskEngine.Prepare(task, this.taskElement, GetParameters(), this.Type);
                    result = taskEngine.Execute();
                    if (result)
                    {
                        taskEngine.PublishOutput();
                    }
                }
                catch (Exception e)
                {
                    task_logger.LogError("Error executing task {0}: {1}", taskElement.LocalName, e.Message);
                    task_logger.LogMessage(MessageImportance.Low,
                                           "Error executing task {0}: {1}", taskElement.LocalName, e.ToString());
                    result = false;
                }
            }
            finally
            {
                LogTaskFinished(result);
            }

            return(result);
        }
Пример #4
0
		public bool Execute ()
		{
			bool		result = false;
			TaskEngine	taskEngine;

			LogTaskStarted ();
			ITask task = null;

			try {
				try {
					task = InitializeTask ();
				} catch (Exception e) {
					LogError ("Error initializing task {0}: {1}", taskElement.LocalName, e.Message);
					LogMessage (MessageImportance.Low, "Error initializing task {0}: {1}",
							taskElement.LocalName, e.ToString ());
					return false;
				}

				try {
					taskEngine = new TaskEngine (parentTarget.Project);
					taskEngine.Prepare (task, this.taskElement, GetParameters (), this.Type);
					result = taskEngine.Execute ();
					if (result)
						taskEngine.PublishOutput ();
				} catch (Exception e) {
					task_logger.LogError ("Error executing task {0}: {1}", taskElement.LocalName, e.Message);
					task_logger.LogMessage (MessageImportance.Low,
							"Error executing task {0}: {1}", taskElement.LocalName, e.ToString ());
					result = false;
				}
			} finally {
				LogTaskFinished (result);
			}

			return result;
		}
Пример #5
0
		bool IBuildTask.ResolveOutputItems ()
		{
			var taskEngine = new TaskEngine (parentTarget.Project, null, Type);

			taskEngine.PublishOutput (taskElement, l => {
				var pv = GetParameterValue (l.Name);

				Expression exp = new Expression ();
				exp.Parse (pv, ParseOptions.AllowItemsNoMetadataAndSplit);
				return exp.ConvertTo (parentTarget.Project, l.PropertyType);
			});

			return true;
		}