示例#1
0
        private static void ProcessBinaryLog(string fullName)
        {
            var util = new StructuredLoggerUtil(fullName);

            if (!util.Succeeded)
            {
                ConsoleUtil.WriteLineError("Build Failed");
            }
            else
            {
                ConsoleUtil.WriteLine("Build Succceeded", ConsoleColor.Green);
            }

            foreach (var(_, Text, _) in util.Warnings)
            {
                ConsoleUtil.WriteLineWarning($"{Text}");
            }
            if (util.Warnings.Count() > 0)
            {
                Console.WriteLine();
            }

            foreach (var(_, Text, _) in util.Errors)
            {
                ConsoleUtil.WriteLineError($"{Text}");
            }
            if (util.Errors.Count() > 0)
            {
                Console.WriteLine();
            }


            if (util.Warnings.Count() == 0)
            {
                ConsoleUtil.WriteLine("No Warnings", ConsoleColor.Green);
            }

            if (util.Errors.Count() == 0)
            {
                ConsoleUtil.WriteLine("No errors", ConsoleColor.Green);
            }
        }
示例#2
0
        private static void ProcessBinaryLog(string fullName)
        {
            var util = new StructuredLoggerUtil(fullName);

            if (!util.Succeeded)
            {
                Console.WriteLine("Build Failed");
            }
            else
            {
                Console.WriteLine("Build Succceeded", ConsoleColor.Green);
            }

            foreach (var(ProjectFile, Message, TargetNames) in util.Projects)
            {
                Console.WriteLine("Project " + ProjectFile + "," + Message + "," + TargetNames);
            }

            foreach (var(TargetName, ParentTarget, TargetFile) in util.Targets)
            {
                Console.WriteLine("Target " + TargetName + "," + ParentTarget + "," + TargetFile);
            }

            foreach (var(TaskName, TaskFile, SenderName) in util.Tasks)
            {
                Console.WriteLine("Task " + TaskName + "," + TaskFile + "," + SenderName);
            }

            foreach (var(ItemName, ItemSpec, MetadataCount) in util.Items)
            {
                Console.WriteLine("Item " + ItemName + "," + ItemSpec + "," + MetadataCount);
            }

            foreach (var(PropertyName, PropertyValue) in util.Properties)
            {
                Console.WriteLine("Property " + PropertyName + "," + PropertyValue);
            }
        }