private LineOutColored?DotNetTest_OutputProcessor(EnumProcessOutputType type, string text) { if (text == null) { return(null); } EnumProcessOutputType processType = type; LineOutColored lineOutColored; ReadOnlySpan <char> textSpan = text; if (type == EnumProcessOutputType.ProcessErr) { return(LineOutColored.Error(text)); } // Find index of the actual message part: // First 2 columns are blank if (StringExtension.SpanSearcherContains(textSpan, "Failed", 2, 9)) { return(LineOutColored.LogicError(text)); } if (StringExtension.SpanSearcherContains(textSpan, "Failed!", 0, 9)) { return(LineOutColored.Error(text)); } if (StringExtension.SpanSearcherContains(textSpan, "Passed!", 0, 9)) { return(LineOutColored.Success(text)); } return(LineOutColored.Normal(text)); }
/// <summary> /// Writes the given text as Success output to both BuildStage output and to the console real time. /// </summary> /// <param name="text"></param> public void AOT_Success(string text) { StageOutput.Add(LineOutColored.Success(text)); if (ShouldLogToConsoleRealTime) { Console.WriteLine(text, Color.Green); } }
private LineOutColored?DotNetPack_OutputProcessor(EnumProcessOutputType type, string text) { if (text == null) { return(null); } EnumProcessOutputType processType = type; LineOutColored lineOutColored; ReadOnlySpan <char> textSpan = text; if (type == EnumProcessOutputType.ProcessErr) { return(LineOutColored.Error(text)); } if (StringExtension.SpanSearcherContains(textSpan, "Successfully created package", 2, 32)) { return(LineOutColored.Success(text)); } return(LineOutColored.Normal(text)); }
private LineOutColored?DotNetRestore_OutputProcessor(EnumProcessOutputType type, string text) { if (text == null) { return(null); } EnumProcessOutputType processType = type; LineOutColored lineOutColored; if (type == EnumProcessOutputType.ProcessErr) { return(LineOutColored.Error(text)); } if (text.StartsWith(" Restored")) { return(LineOutColored.Success(text)); } if (text.Contains("up-to-date:")) { return(LineOutColored.Success(text)); } return(LineOutColored.Normal(text)); }