public static bool TryCreate(InspectCommandArgs args, [NotNullWhen(true)] out InspectionParameters?parameters, [NotNullWhen(false)] out string?message) { message = null; parameters = null; if (!TryParseProjects(args.ExcludedProjects, out var projects, out message)) { return(false); } if (!TryParseNamespaces(args.ExcludedNamespaces, out var namespaces, out message)) { return(false); } if (!TryParseMetrics(args.Metrics, out var metrics, out message)) { return(false); } if (!TryParseMaxConcurrency(args.MaxConcurrency, out var maxConcurrency, out message)) { return(false); } parameters = InspectionParameters.CreateWithDefaults(projects, namespaces, metrics, maxConcurrency); return(true); }
public MetricsView(IConsole console, InspectCommandArgs args) { _renderer = new ConsoleRenderer(console, OutputMode.PlainText); _converter = new MetricTableLineConverter(); _showAll = args.ShowAll; }