18 instantiations of FormattedCell
NuGet.CommandLine.XPlat (18)
Utility\ProjectPackagesPrintUtility.cs (15)
120p => new FormattedCell(p.PackageId), 121p => new FormattedCell(GetAutoReferenceMarker(p, printingTransitive, ref autoReferenceFlagged)), 127valueSelectors.Add(p => new FormattedCell(p?.RequestedVersion)); 131valueSelectors.Add(p => new FormattedCell(p.ResolvedVersion)); 137valueSelectors.Add(p => new FormattedCell(p.LatestVersion)); 140valueSelectors.Add(p => new FormattedCell( 142valueSelectors.Add(p => new FormattedCell( 177? new List<FormattedCell> { new FormattedCell(string.Empty, foregroundColor: null) } 185? new List<FormattedCell> { new FormattedCell(string.Empty, foregroundColor: null) } 186: vulnerabilityMetadata.Select(v => new FormattedCell(v.AdvisoryUrl?.ToString() ?? string.Empty, foregroundColor: null)); 193case 0: return new FormattedCell("Low", foregroundColor: null); // default color for low severity 194case 1: return new FormattedCell("Moderate", foregroundColor: ConsoleColor.Yellow); 195case 2: return new FormattedCell("High", foregroundColor: ConsoleColor.Red); 196case 3: return new FormattedCell("Critical", foregroundColor: ConsoleColor.Red); 199return new FormattedCell(string.Empty, foregroundColor: null);
Utility\TableParser.cs (3)
37headers.AddRange(columnHeaders.Select(h => new FormattedCell(h))); 109formattedDataCell = new FormattedCell(); 137stringTable.Add(new FormattedCell(Environment.NewLine));
29 references to FormattedCell
NuGet.CommandLine.XPlat (29)
Utility\FormattedCell.cs (3)
11internal class FormattedCell : IEquatable<FormattedCell> 24public bool Equals(FormattedCell other) => Value == other?.Value && ForegroundColor == other?.ForegroundColor; 26public override bool Equals(object obj) => Equals(obj as FormattedCell);
Utility\ProjectPackagesPrintUtility.cs (8)
103internal static IEnumerable<FormattedCell> BuildPackagesTable( 157internal static void PrintPackagesTable(IEnumerable<FormattedCell> tableToPrint) 159foreach (var formattedCell in tableToPrint) 173internal static IEnumerable<FormattedCell> PrintVulnerabilitiesSeverities( 177? new List<FormattedCell> { new FormattedCell(string.Empty, foregroundColor: null) } 181internal static IEnumerable<FormattedCell> PrintVulnerabilitiesAdvisoryUrls( 185? new List<FormattedCell> { new FormattedCell(string.Empty, foregroundColor: null) } 189private static FormattedCell VulnerabilityToSeverityFormattedCell(PackageVulnerabilityMetadata vulnerability)
Utility\TableParser.cs (18)
16internal static IEnumerable<FormattedCell> ToStringTable<T>( 24internal static IEnumerable<FormattedCell> ToFormattedStringTable<T>( 29var stringTable = new List<List<FormattedCell>>(); 36var headers = new List<FormattedCell>(); 42var columnQueues = new Dictionary<int, Queue<FormattedCell>>(); 46var row = new List<FormattedCell>(); 54var queue = new Queue<FormattedCell>(); 57if (dataCell is FormattedCell formattedDataCell) 82if (data is FormattedCell formattedDataCell) 95var subsequentRow = new List<FormattedCell>(); 98var formattedDataCell = (FormattedCell)null; 122internal static IEnumerable<FormattedCell> ToPaddedStringTable(IEnumerable<ICollection<FormattedCell>> values) 125var stringTable = new List<FormattedCell>(); 130foreach (var dataCell in row) 143private static int[] GetMaxColumnsWidth(IEnumerable<ICollection<FormattedCell>> values) 155foreach (var formattedDataCell in row)