示例#1
0
        internal static string LookupSeverity(TraceEventLevel level, TraceEventOpcode opcode)
        {
            string severity;

            if (opcode == TraceEventOpcode.Info)
            {
                switch (level)
                {
                case TraceEventLevel.Critical:
                    severity = "Critical";
                    break;

                case TraceEventLevel.Error:
                    severity = "Error";
                    break;

                case TraceEventLevel.Warning:
                    severity = "Warning";
                    break;

                case TraceEventLevel.Informational:
                    severity = "Information";
                    break;

                case TraceEventLevel.Verbose:
                    severity = "Verbose";
                    break;

                default:
                    severity = level.ToString();
                    break;
                }
            }
            else
            {
                switch (opcode)
                {
                case TraceEventOpcode.Start:
                    severity = "Start";
                    break;

                case TraceEventOpcode.Stop:
                    severity = "Stop";
                    break;

                case TraceEventOpcode.Suspend:
                    severity = "Suspend";
                    break;

                case TraceEventOpcode.Resume:
                    severity = "Resume";
                    break;

                default:
                    severity = opcode.ToString();
                    break;
                }
            }
            return(severity);
        }
        internal static string LookupSeverity(TraceEventLevel level, TraceEventOpcode opcode)
        {
            switch (opcode)
            {
            case TraceEventOpcode.Start:
                return("Start");

            case TraceEventOpcode.Stop:
                return("Stop");

            case TraceEventOpcode.Resume:
                return("Resume");

            case TraceEventOpcode.Suspend:
                return("Suspend");

            case TraceEventOpcode.Info:
                switch (level)
                {
                case TraceEventLevel.Critical:
                    return("Critical");

                case TraceEventLevel.Error:
                    return("Error");

                case TraceEventLevel.Warning:
                    return("Warning");

                case TraceEventLevel.Informational:
                    return("Information");

                case TraceEventLevel.Verbose:
                    return("Verbose");
                }
                return(level.ToString());
            }
            return(opcode.ToString());
        }
        internal static string LookupSeverity(TraceEventLevel level, TraceEventOpcode opcode)
        {
            switch (opcode)
            {
                case TraceEventOpcode.Start:
                    return "Start";

                case TraceEventOpcode.Stop:
                    return "Stop";

                case TraceEventOpcode.Resume:
                    return "Resume";

                case TraceEventOpcode.Suspend:
                    return "Suspend";

                case TraceEventOpcode.Info:
                    switch (level)
                    {
                        case TraceEventLevel.Critical:
                            return "Critical";

                        case TraceEventLevel.Error:
                            return "Error";

                        case TraceEventLevel.Warning:
                            return "Warning";

                        case TraceEventLevel.Informational:
                            return "Information";

                        case TraceEventLevel.Verbose:
                            return "Verbose";
                    }
                    return level.ToString();
            }
            return opcode.ToString();
        }
示例#4
0
        internal static string LookupSeverity(TraceEventLevel level, TraceEventOpcode opcode)
        {
            string str;

            if (opcode != TraceEventOpcode.Info)
            {
                TraceEventOpcode traceEventOpcode = opcode;
                switch (traceEventOpcode)
                {
                case TraceEventOpcode.Start:
                {
                    str = "Start";
                    break;
                }

                case TraceEventOpcode.Stop:
                {
                    str = "Stop";
                    break;
                }

                default:
                {
                    switch (traceEventOpcode)
                    {
                    case TraceEventOpcode.Resume:
                    {
                        str = "Resume";
                        break;
                    }

                    case TraceEventOpcode.Suspend:
                    {
                        str = "Suspend";
                        break;
                    }

                    default:
                    {
                        str = opcode.ToString();
                        break;
                    }
                    }
                    break;
                }
                }
            }
            else
            {
                switch (level)
                {
                case TraceEventLevel.Critical:
                {
                    str = "Critical";
                    break;
                }

                case TraceEventLevel.Error:
                {
                    str = "Error";
                    break;
                }

                case TraceEventLevel.Warning:
                {
                    str = "Warning";
                    break;
                }

                case TraceEventLevel.Informational:
                {
                    str = "Information";
                    break;
                }

                case TraceEventLevel.Verbose:
                {
                    str = "Verbose";
                    break;
                }

                default:
                {
                    str = level.ToString();
                    break;
                }
                }
            }
            return(str);
        }
示例#5
0
 internal static string LookupSeverity(TraceEventLevel level, TraceEventOpcode opcode)
 {
     string severity;
     if (opcode == TraceEventOpcode.Info)
     {
         switch (level)
         {
             case TraceEventLevel.Critical:
                 severity = "Critical";
                 break;
             case TraceEventLevel.Error:
                 severity = "Error";
                 break;
             case TraceEventLevel.Warning:
                 severity = "Warning";
                 break;
             case TraceEventLevel.Informational:
                 severity = "Information";
                 break;
             case TraceEventLevel.Verbose:
                 severity = "Verbose";
                 break;
             default:
                 severity = level.ToString();
                 break;
         }
     }
     else
     {
         switch (opcode)
         {
             case TraceEventOpcode.Start:
                 severity = "Start";
                 break;
             case TraceEventOpcode.Stop:
                 severity = "Stop";
                 break;
             case TraceEventOpcode.Suspend:
                 severity = "Suspend";
                 break;
             case TraceEventOpcode.Resume:
                 severity = "Resume";
                 break;
             default:
                 severity = opcode.ToString();
                 break;
         }
     }
     return severity;
 }