36 references to AnsiParser
Aspire.Dashboard (3)
Components\Pages\ConsoleLogs.razor.cs (1)
507writer.WriteLine(AnsiParser.StripControlSequences(entry.RawContent));
ConsoleLogs\LogParser.cs (2)
11private AnsiParser.ParserState? _residualState; 42var conversionResult = AnsiParser.ConvertToHtml(updatedText, _residualState);
Aspire.Dashboard.Tests (33)
ConsoleLogsTests\AnsiParserTests.cs (33)
19var result = AnsiParser.ConvertToHtml(input); 40var result = AnsiParser.ConvertToHtml(input); 54var result = AnsiParser.ConvertToHtml(input); 65var expectedResidualState = new AnsiParser.ParserState() { ForegroundColor = ConsoleColor.Green }; 66var result = AnsiParser.ConvertToHtml(input); 77var result = AnsiParser.ConvertToHtml(input); 88var result = AnsiParser.ConvertToHtml(input); 99var result = AnsiParser.ConvertToHtml(input); 110var result = AnsiParser.ConvertToHtml(input); 121var result = AnsiParser.ConvertToHtml(input); 132var result = AnsiParser.ConvertToHtml(input); 145var result1 = AnsiParser.ConvertToHtml(input1); 146var result2 = AnsiParser.ConvertToHtml(input2, result1.ResidualState); 149Assert.Equal(new AnsiParser.ParserState() { ForegroundColor = ConsoleColor.Green }, result1.ResidualState); 161var result1 = AnsiParser.ConvertToHtml(input1); 162var result2 = AnsiParser.ConvertToHtml(input2, result1.ResidualState); 165Assert.Equal(new AnsiParser.ParserState() { ForegroundColor = ConsoleColor.Green, BackgroundColor = ConsoleColor.Green }, result1.ResidualState); 189var result = AnsiParser.ConvertToHtml(input); 206var result = AnsiParser.ConvertToHtml(input); 217var expectedResidualState = new AnsiParser.ParserState() { ForegroundColor = ConsoleColor.Green, BackgroundColor = ConsoleColor.Green }; 218var result = AnsiParser.ConvertToHtml(input); 229var expectedResidualState = new AnsiParser.ParserState() { Bright = true, BackgroundColor = ConsoleColor.Green }; 230var result = AnsiParser.ConvertToHtml(input); 241var expectedResidualState = new AnsiParser.ParserState() { Bright = true, ForegroundColor = ConsoleColor.Green }; 242var result = AnsiParser.ConvertToHtml(input); 253var result = AnsiParser.ConvertToHtml(input); 267var result = AnsiParser.ConvertToHtml(input); 281var result = AnsiParser.ConvertToHtml(input); 291var result = AnsiParser.ConvertToHtml(input); 302var result = AnsiParser.ConvertToHtml(input); 312var result = AnsiParser.ConvertToHtml(input); 329var result = AnsiParser.StripControlSequences(input); 346var result = AnsiParser.StripControlSequences(input);