예제 #1
0
        public static string ToText(this CompilerEvent stage)
        {
            switch (stage)
            {
            case CompilerEvent.CompilingMethod: return("Compiling Method");

            case CompilerEvent.CompilingType: return("Compiling Type");

            case CompilerEvent.SchedulingType: return("Scheduling Type");

            case CompilerEvent.SchedulingMethod: return("Scheduling Method");

            case CompilerEvent.Linking: return("Linking");

            case CompilerEvent.DebugInfo: return("Debug Info");

            case CompilerEvent.PreCompileStageStart: return("Pre-Compile Stage Started");

            case CompilerEvent.PreCompileStageEnd: return("Pre-Compile Stage Ended");

            case CompilerEvent.PostCompileStageStart: return("Post-Compile Stage Started");

            case CompilerEvent.PostCompileStageEnd: return("Post-Compile Stage Ended");

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

            case CompilerEvent.Exception: return("Exception");

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

            default: return(stage.ToString());
            }
        }
예제 #2
0
        public static string ToText(this CompilerEvent stage)
        {
            switch (stage)
            {
            case CompilerEvent.CompilerStart: return("Compiler Started");

            case CompilerEvent.CompilerEnd: return("Compiler Completed");

            case CompilerEvent.CompilingMethods: return("Compiling Methods");

            case CompilerEvent.CompilingMethodsCompleted: return("Compiling Methods Completed");

            case CompilerEvent.MethodCompileStart: return("Method Compile Started");

            case CompilerEvent.MethodCompileEnd: return("Method Compile Completed");

            case CompilerEvent.MethodScheduled: return("Method Scheduled");

            case CompilerEvent.InlineMethodsScheduled: return("Inline Methods Scheduled");

            case CompilerEvent.LinkingStart: return("Linking Started");

            case CompilerEvent.LinkingEnd: return("Linking Completed");

            case CompilerEvent.SetupStart: return("Setup Started");

            case CompilerEvent.SetupEnd: return("Setup Completed");

            case CompilerEvent.FinalizationStart: return("Finalization Started");

            case CompilerEvent.FinalizationEnd: return("Finalization Completed");

            case CompilerEvent.SetupStageStart: return("Setup Stage Started");

            case CompilerEvent.SetupStageEnd: return("Setup Stage Completed");

            case CompilerEvent.FinalizationStageStart: return("Finalization Stage Started");

            case CompilerEvent.FinalizationStageEnd: return("Finalization Stage Completed");

            case CompilerEvent.DebugInfo: return("Debug Info");

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

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

            case CompilerEvent.Exception: return("Exception");

            default: return(stage.ToString());
            }
        }
예제 #3
0
 void ITraceListener.OnNewCompilerTraceEvent(CompilerEvent compilerStage, string info, int threadID)
 {
     Debug.WriteLine(compilerStage.ToString() + ": " + info);
 }
예제 #4
0
 void ITraceListener.OnNewCompilerTraceEvent(CompilerEvent compilerEvent, string message, int threadID)
 {
     Debug.WriteLine(compilerEvent.ToString() + ": " + message);
 }
 void ICompilerEventListener.SubmitTraceEvent(CompilerEvent compilerStage, string info)
 {
     Debug.WriteLine(compilerStage.ToString() + ": " + info);
 }
 void ITraceListener.OnNewCompilerTraceEvent(CompilerEvent compilerStage, string info, int threadID)
 {
     Debug.WriteLine(compilerStage.ToString() + ": " + info);
 }
        void ICompilerEventListener.SubmitTraceEvent(CompilerEvent compilerStage, string info)
        {
            if (DebugOutput)
                Debug.WriteLine(compilerStage.ToString() + ": " + info);

            if (!ConsoleOutput)
                return;

            switch (compilerStage)
            {
                case CompilerEvent.CompilingMethod:
                    {
                        if (Quiet)
                        {
                            supressed = info;
                            break;
                        }
                        DisplayCompilingMethod(info);
                        break;
                    }

                case CompilerEvent.CompilingType:
                    {
                        if (Quiet) break;
                        Console.ForegroundColor = ConsoleColor.Yellow;
                        Console.Write(@"[Compiling]  ");
                        Console.ForegroundColor = ConsoleColor.White;
                        Console.WriteLine(info);
                        break;
                    }

                case CompilerEvent.SchedulingType:
                    {
                        if (Quiet) break;
                        Console.ForegroundColor = ConsoleColor.Blue;
                        Console.Write(@"[Scheduling]  ");
                        Console.ForegroundColor = ConsoleColor.White;
                        Console.WriteLine(info);
                        break;
                    }

                case CompilerEvent.SchedulingMethod:
                    {
                        if (Quiet) break;
                        Console.ForegroundColor = ConsoleColor.Blue;
                        Console.Write(@"[Scheduling]  ");
                        Console.ForegroundColor = ConsoleColor.White;
                        Console.WriteLine(info);
                        break;
                    }

                case CompilerEvent.Error:
                    {
                        if (Quiet && !string.IsNullOrEmpty(supressed))
                        {
                            DisplayCompilingMethod(supressed);
                            supressed = null;
                        }

                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.Write(@"[Error]  ");
                        Console.ForegroundColor = ConsoleColor.White;
                        Console.WriteLine(info);
                        break;
                    }

                case CompilerEvent.Warning:
                    {
                        if (Quiet && !string.IsNullOrEmpty(supressed))
                        {
                            DisplayCompilingMethod(supressed);
                            supressed = null;
                        }

                        Console.ForegroundColor = ConsoleColor.Yellow;
                        Console.Write(@"[Warning]  ");
                        Console.ForegroundColor = ConsoleColor.White;
                        Console.WriteLine(info);
                        break;
                    }

                default: break;
            }
        }