private Task CreateTask(TaskStartedEventArgs taskStartedEventArgs)
        {
            var taskName  = stringTable.Intern(taskStartedEventArgs.TaskName);
            var assembly  = stringTable.Intern(GetTaskAssembly(taskStartedEventArgs.TaskName));
            var taskId    = taskStartedEventArgs.BuildEventContext.TaskId;
            var startTime = taskStartedEventArgs.Timestamp;

            Task result;

            if (taskName == "Copy")
            {
                result = new CopyTask()
                {
                    Name         = taskName,
                    Id           = taskId,
                    StartTime    = startTime,
                    FromAssembly = assembly
                };
                return(result);
            }

            var task = new Task
            {
                Name         = taskName,
                Id           = taskId,
                StartTime    = startTime,
                FromAssembly = assembly
            };

            return(task);
        }
Пример #2
0
        private Task CreateTask(TaskStartedEventArgs taskStartedEventArgs)
        {
            var taskName  = stringTable.Intern(taskStartedEventArgs.TaskName);
            var assembly  = stringTable.Intern(GetTaskAssembly(taskName));
            var taskId    = taskStartedEventArgs.BuildEventContext.TaskId;
            var startTime = taskStartedEventArgs.Timestamp;

            Task result;

            if (taskName == "Copy")
            {
                result = new CopyTask();
            }
            else
            {
                result = new Task();
            }

            result.Name           = taskName;
            result.Id             = taskId;
            result.NodeId         = taskStartedEventArgs.BuildEventContext.NodeId;
            result.StartTime      = startTime;
            result.FromAssembly   = assembly;
            result.SourceFilePath = stringTable.Intern(taskStartedEventArgs.TaskFile);

            return(result);
        }
Пример #3
0
 public void AnalyzeFileCopies(CopyTask copyTask)
 {
     foreach (var copyOperation in copyTask.FileCopyOperations)
     {
         if (copyOperation.Copied)
         {
             ProcessCopy(copyOperation.Source, copyOperation.Destination);
         }
     }
 }
Пример #4
0
        private Task CreateTask(TaskStartedEventArgs taskStartedEventArgs)
        {
            var taskName = Intern(taskStartedEventArgs.TaskName);

            string assembly = null;

            if (!IgnoreAssembly(taskName))
            {
                assembly = Intern(GetTaskAssembly(taskName));
            }

            var taskId    = taskStartedEventArgs.BuildEventContext.TaskId;
            var startTime = taskStartedEventArgs.Timestamp;

            Task result;

            switch (taskName)
            {
            case "Copy":
                result = new CopyTask();
                break;

            case "Csc":
                result = new CscTask();
                break;

            case "Vbc":
                result = new VbcTask();
                break;

            case "Fsc":
                result = new FscTask();
                break;

            default:
                result = new Task();
                break;
            }

            result.Name           = taskName;
            result.Id             = taskId;
            result.NodeId         = taskStartedEventArgs.BuildEventContext.NodeId;
            result.StartTime      = startTime;
            result.FromAssembly   = assembly;
            result.SourceFilePath = Intern(taskStartedEventArgs.TaskFile);

            return(result);
        }