private async Task <int> Run(ProgressContext context, T settings) { try { var task = context.AddTask("Sending/receiving requests"); var chart = WieldTool(task, settings); await SaveChart(chart, settings.Filename); context.Refresh(); return(0); } catch (Exception e) { _console.WriteException(e, ExceptionFormats.ShortenEverything); return(1); } }
public override void Run(IAnsiConsole console) { console.WriteException(Exception, new ExceptionSettings { Format = ExceptionFormats.ShortenEverything | ExceptionFormats.ShowLinks, Style = new ExceptionStyle { Exception = new Style().Foreground(Color.Grey), Message = new Style().Foreground(Color.White), NonEmphasized = new Style().Foreground(Color.Cornsilk1), Parenthesis = new Style().Foreground(Color.Cornsilk1), Method = new Style().Foreground(Color.Red), ParameterName = new Style().Foreground(Color.Cornsilk1), ParameterType = new Style().Foreground(Color.Red), Path = new Style().Foreground(Color.Red), LineNumber = new Style().Foreground(Color.Cornsilk1), } }); }
public override void Run(IAnsiConsole console) => console.WriteException(Exception);
public override void Run(IAnsiConsole console) => console.WriteException(Exception, ExceptionFormats.ShortenEverything | ExceptionFormats.ShowLinks);
public override void Run(IAnsiConsole console) => console.WriteException(Exception, ExceptionFormats.ShortenPaths);