Beispiel #1
0
 public static ConsoleColor GetColor(ExceptionInfoType infoType)
 {
     if (infoType == ExceptionInfoType.Error)
     {
         return(ConsoleColor.Red);
     }
     else if (infoType == ExceptionInfoType.Warn)
     {
         return(ConsoleColor.Yellow);
     }
     else
     {
         return(ConsoleColor.White);
     }
 }
        public static ConvertExceptionInfo Create(bool abend, ExceptionInfoType infoType, string info = "")
        {
            ConvertExceptionInfo exceptionInfo = new ConvertExceptionInfo();

            exceptionInfo.Abend = abend;
            exceptionInfo.Info  = info;
            if (exceptionInfo.Abend)
            {
                exceptionInfo.InfoType = ExceptionInfoType.Error;
            }
            else
            {
                exceptionInfo.InfoType = infoType;
            }

            return(exceptionInfo);
        }