private void AnalyzeTask(Task task)
        {
            if (!string.IsNullOrEmpty(task.CommandLineArguments))
            {
                task.AddChildAtBeginning(new Property {
                    Name = "CommandLineArguments", Value = task.CommandLineArguments
                });
            }

            if (!string.IsNullOrEmpty(task.FromAssembly))
            {
                task.AddChildAtBeginning(new Property {
                    Name = "Assembly", Value = task.FromAssembly
                });
            }

            taskDurations.TryGetValue(task.Name, out var duration);
            duration += task.Duration;
            taskDurations[task.Name] = duration;

            if (task.Name == "ResolveAssemblyReference")
            {
                resolveAssemblyReferenceAnalyzer.AnalyzeResolveAssemblyReference(task);
            }
            else if (task.Name == "Message")
            {
                MessageTaskAnalyzer.Analyze(task);
            }
            else if (task.Name == "Csc")
            {
                CscTaskAnalyzer.Analyze(task);
            }

            doubleWritesAnalyzer.AnalyzeTask(task);
        }
Exemplo n.º 2
0
        private void AnalyzeTask(Task task)
        {
            if (!string.IsNullOrEmpty(task.CommandLineArguments))
            {
                task.AddChildAtBeginning(new Property {
                    Name = "CommandLineArguments", Value = task.CommandLineArguments
                });
            }

            if (!string.IsNullOrEmpty(task.FromAssembly))
            {
                task.AddChildAtBeginning(new Property {
                    Name = "Assembly", Value = task.FromAssembly
                });
            }

            if (task.Name == "ResolveAssemblyReference")
            {
                CopyLocalAnalyzer.AnalyzeResolveAssemblyReference(task);
            }
            else if (task is CopyTask copyTask)
            {
                doubleWritesAnalyzer.AnalyzeFileCopies(copyTask);
            }
            else if (task.Name == "Message")
            {
                MessageTaskAnalyzer.Analyze(task);
            }
        }
Exemplo n.º 3
0
        private void AnalyzeTask(Task task)
        {
            if (!string.IsNullOrEmpty(task.CommandLineArguments))
            {
                task.AddChildAtBeginning(new Property {
                    Name = Strings.CommandLineArguments, Value = task.CommandLineArguments
                });
            }

            if (!string.IsNullOrEmpty(task.FromAssembly))
            {
                task.AddChildAtBeginning(new Property {
                    Name = Strings.Assembly, Value = task.FromAssembly
                });
                build.RegisterTask(task);
            }

            taskDurations.TryGetValue(task.Name, out var duration);
            duration += task.Duration;
            taskDurations[task.Name] = duration;

            if (task.Name == "ResolveAssemblyReference")
            {
                resolveAssemblyReferenceAnalyzer.AnalyzeResolveAssemblyReference(task);
            }
            else if (task.Name == "Message")
            {
                MessageTaskAnalyzer.Analyze(task);
            }
            else if (task.Name == "Csc")
            {
                var analyzerReport = CscTaskAnalyzer.Analyze(task);
                if (analyzerReport is not null)
                {
                    analyzerReports.Add(analyzerReport);
                }
            }

            doubleWritesAnalyzer.AnalyzeTask(task);
        }