コード例 #1
0
ファイル: VM.cs プロジェクト: thefex/Continuous
            public override void Print(AbstractMessage msg, bool showFullPath)
            {
                var line   = 0;
                var column = 0;

                try {
                    line   = msg.Location.Row;
                    column = msg.Location.Column;
                } catch {
                    //Log (ex);
                }
                var m = new EvalMessage {
                    MessageType = msg.MessageType,
                    Text        = msg.Text,
                    Line        = line,
                    Column      = column,
                };

                Messages.Add(m);

                //
                // Print it to the console if there's an error
                //
                if (msg.MessageType == "error")
                {
                    var tm = msg.Text;
                    System.Threading.ThreadPool.QueueUserWorkItem(_ =>
                                                                  Console.WriteLine("ERROR: {0}", tm));
                }
            }
コード例 #2
0
ファイル: MonoEvaluator.cs プロジェクト: leo-mck/XAMLator
        void AddMessage(string messageType, string text, int line, int column)
        {
            var m = new EvalMessage(messageType, text, line, column);

            Messages.Add(m);
            if (m.MessageType == "error")
            {
                Log.Error(m.Text);
            }
        }
コード例 #3
0
ファイル: VM.cs プロジェクト: thefex/Continuous
            public void AddError(Exception ex)
            {
                var text = ex.ToString();

                var m = new EvalMessage {
                    MessageType = "error",
                    Text        = text,
                    Line        = 0,
                    Column      = 0,
                };

                Messages.Add(m);

                //
                // Print it to the console if there's an error
                //
                System.Threading.ThreadPool.QueueUserWorkItem(_ =>
                                                              Console.WriteLine("EVAL ERROR: {0}", text));
            }
コード例 #4
0
ファイル: VM.cs プロジェクト: mono/Continuous
			public void AddError (Exception ex)
			{
				var text = ex.ToString ();

				var m = new EvalMessage {
					MessageType = "error",
					Text = text,
					Line = 0,
					Column = 0,
				};

				Messages.Add (m);

				//
				// Print it to the console if there's an error
				//
				System.Threading.ThreadPool.QueueUserWorkItem (_ =>
					Console.WriteLine ("EVAL ERROR: {0}", text));
			}
コード例 #5
0
ファイル: VM.cs プロジェクト: mono/Continuous
			public override void Print (AbstractMessage msg, bool showFullPath)
			{
				var line = 0;
				var column = 0;
				try {
					line = msg.Location.Row;
					column = msg.Location.Column;
				} catch {
					//Log (ex);
				}
				var m = new EvalMessage {
					MessageType = msg.MessageType,
					Text = msg.Text,
					Line = line,
					Column = column,
				};

				Messages.Add (m);

				//
				// Print it to the console if there's an error
				//
				if (msg.MessageType == "error") {
					var tm = msg.Text;
					System.Threading.ThreadPool.QueueUserWorkItem (_ =>
						Console.WriteLine ("ERROR: {0}", tm));
				}
			}