예제 #1
0
        private void ExecuteTask(IntrinsicTask task, Lookup lookup)
        {
            if (lookup == null)
            {
                lookup = LookupHelpers.CreateEmptyLookup();
            }

            task.ExecuteTask(lookup);
        }
예제 #2
0
        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;
        }
예제 #3
0
 private void ExecuteTask(IntrinsicTask task)
 {
     ExecuteTask(task, null);
 }
예제 #4
0
        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);
            }
        }