Esempio n. 1
0
        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));
        }
Esempio n. 2
0
 /// <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);
     }
 }
Esempio n. 3
0
        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));
        }
Esempio n. 4
0
        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));
        }