private void ExecuteTask(IntrinsicTask task, Lookup lookup) { if (lookup == null) { lookup = LookupHelpers.CreateEmptyLookup(); } task.ExecuteTask(lookup); }
private static IntrinsicTask CreateIntrinsicTask(string content) { XmlDocument doc = new XmlDocument(); doc.LoadXml(content); IntrinsicTask task = new IntrinsicTask((XmlElement)doc.FirstChild.FirstChild, new EngineLoggingServicesInProc(new EventSource(), true, null), null, Directory.GetCurrentDirectory(), new ItemDefinitionLibrary(new Project())); return task; }
private void ExecuteTask(IntrinsicTask task) { ExecuteTask(task, null); }
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); } }