Пример #1
0
        private void PrintImportInfo(MBEV.ResolvedImport import, int indentLength)
        {
            var indent = indentLength > 0 ? new StringBuilder().Insert(0, " ", indentLength).ToString() : "";

            Utils.WriteColor(indent, ConsoleColor.White);
            Utils.WriteColor($"{import.ImportingElement.Location.Line}: ", ConsoleColor.Cyan);

            var importedProjectFile = project.ResolveAllProperties(import.ImportedProject.Location.File);

            Utils.WriteColor(Path.GetDirectoryName(importedProjectFile) + Path.DirectorySeparatorChar, ConsoleColor.DarkGreen);
            Utils.WriteLineColor(Path.GetFileName(importedProjectFile), ConsoleColor.Green);

            if (!string.IsNullOrWhiteSpace(import.ImportingElement.Condition))
            {
                Utils.WriteColor($"{indent}because ", ConsoleColor.DarkGray);
                Utils.WriteLineColor($"{import.ReducedCondition()}", ConsoleColor.DarkCyan);
            }

            Console.WriteLine();
        }