private void ExecuteTask(IntrinsicTask task, Lookup lookup) { if (lookup == null) { lookup = LookupHelpers.CreateEmptyLookup(); } task.ExecuteTask(lookup); }
private void ExecuteIntrinsicTask(XmlElement taskNode) { // Intrinsic tasks should have their messages logged in the context of the target as they will not have task started or finished events so use an invalid taskID BuildEventContext buildEventContext = PrepareBuildEventContext(true); TaskExecutionMode executionMode = DetermineExecutionMode(); IntrinsicTask task = new IntrinsicTask(taskNode, parentEngine.LoggingServices, buildEventContext, parentProject.ProjectDirectory, parentProject.ItemDefinitionLibrary); if ((executionMode & TaskExecutionMode.InferOutputsOnly) != TaskExecutionMode.Invalid) { task.ExecuteTask(lookupForInference); } if ((executionMode & TaskExecutionMode.ExecuteTaskAndGatherOutputs) != TaskExecutionMode.Invalid) { task.ExecuteTask(lookupForExecution); } }