Пример #1
0
        void ITraceListener.OnCompilerEvent(CompilerEvent compilerEvent, string message, int threadID)
        {
            if (compilerEvent == CompilerEvent.CompilerStart ||
                compilerEvent == CompilerEvent.CompilerEnd ||
                compilerEvent == CompilerEvent.CompilingMethods ||
                compilerEvent == CompilerEvent.CompilingMethodsCompleted ||
                compilerEvent == CompilerEvent.InlineMethodsScheduled ||
                compilerEvent == CompilerEvent.LinkingStart ||
                compilerEvent == CompilerEvent.LinkingEnd ||
                compilerEvent == CompilerEvent.Warning ||
                compilerEvent == CompilerEvent.Error ||
                compilerEvent == CompilerEvent.Exception)
            {
                string status = $"Compiling: {$"{(DateTime.Now - builder.CompileStartTime).TotalSeconds:0.00}"} secs: {compilerEvent.ToText()}";

                if (!string.IsNullOrEmpty(message))
                {
                    status += $"- { message}";
                }

                lock (_lock)
                {
                    builder.AddOutput(status);
                }
            }
            else if (compilerEvent == CompilerEvent.Counter)
            {
                lock (_lock)
                {
                    builder.AddCounters(message);
                }
            }
        }
Пример #2
0
        void ITraceListener.OnNewCompilerTraceEvent(CompilerEvent compilerStage, string message, int threadID)
        {
            lock (mylock)
            {
                if (compilerStage == CompilerEvent.CompilerStageStart || compilerStage == CompilerEvent.CompilerStageEnd || compilerStage == CompilerEvent.Exception)
                {
                    string status = "Compiling: " + String.Format("{0:0.00}", (DateTime.Now - builder.CompileStartTime).TotalSeconds) + " secs: " + compilerStage.ToText() + ": " + message;

                    builder.AddOutput(status);
                }
                else if (compilerStage == CompilerEvent.Counter)
                {
                    builder.AddCounters(message);
                }
            }
        }
        void ITraceListener.OnCompilerEvent(CompilerEvent compilerEvent, string message, int threadID)
        {
            if (compilerEvent == CompilerEvent.PreCompileStageStart ||
                compilerEvent == CompilerEvent.PreCompileStageEnd ||
                compilerEvent == CompilerEvent.PostCompileStageStart ||
                compilerEvent == CompilerEvent.PostCompileStageEnd ||
                compilerEvent == CompilerEvent.Exception)
            {
                string status = $"Compiling: {$"{(DateTime.Now - builder.CompileStartTime).TotalSeconds:0.00}"} secs: {compilerEvent.ToText()}: {message}";

                lock (_lock)
                {
                    builder.AddOutput(status);
                }
            }
            else if (compilerEvent == CompilerEvent.Counter)
            {
                lock (_lock)
                {
                    builder.AddCounters(message);
                }
            }
        }