Ejemplo n.º 1
0
        public async void Add(VariableObject model)
        {
            var newWatch = new WatchViewModel(this, _debugManager.CurrentDebugger, model);

            await newWatch.Evaluate(_debugManager.CurrentDebugger);

            Dispatcher.UIThread.InvokeAsync(() => { Children.Add(newWatch); });

            //InvalidateColumnWidths();
        }
Ejemplo n.º 2
0
        public async Task <VariableObject> ProbeExpressionAsync(string expression)
        {
            VariableObject result = null;

            if (CurrentDebugger.State == DebuggerState.Paused)
            {
                result =
                    await CurrentDebugger.CreateWatchAsync(string.Format("probe{0}", CurrentDebugger.GetVariableId()), expression);
            }

            return(result);
        }
Ejemplo n.º 3
0
        public static VariableObject FromDataString(VariableObject parent, string data, string expression = "")
        {
            var result = new VariableObject();

            result.Expression = expression;

            var pairs = data.ToNameValuePairs();

            foreach (var pair in pairs)
            {
                switch (pair.Name)
                {
                case "name":
                    result.Id = pair.Value;
                    break;

                case "numchild":
                    result.NumChildren = Convert.ToInt32(pair.Value);
                    break;

                case "value":
                    result.Value = pair.Value;
                    break;

                case "type":
                    result.Type = pair.Value;
                    break;

                case "thread-id":
                    break;

                case "has_more":
                    break;

                case "exp":
                    result.Expression = pair.Value;
                    break;

                default:
                    Console.WriteLine("Unimplemented variable object field.");
                    break;
                }
            }

            result.Parent = parent;

            return(result);
        }
Ejemplo n.º 4
0
 public void AddExistingWatch(VariableObject variable)
 {
     Add(variable);
 }
		public void AddExistingWatch(VariableObject variable)
		{
			Add(variable);
		}
		public async void Add(VariableObject model)
		{
			var newWatch = new WatchViewModel(this, _debugManager.CurrentDebugger, model);

			await newWatch.Evaluate(_debugManager.CurrentDebugger);

			Dispatcher.UIThread.InvokeAsync(() => { Children.Add(newWatch); });

			//InvalidateColumnWidths();
		}
Ejemplo n.º 7
0
		public static VariableObject FromDataString(VariableObject parent, string data, string expression = "")
		{
			var result = new VariableObject();

			result.Expression = expression;

			var pairs = data.ToNameValuePairs();

			foreach (var pair in pairs)
			{
				switch (pair.Name)
				{
					case "name":
						result.Id = pair.Value;
						break;

					case "numchild":
						result.NumChildren = Convert.ToInt32(pair.Value);
						break;

					case "value":
						result.Value = pair.Value;
						break;

					case "type":
						result.Type = pair.Value;
						break;

					case "thread-id":
						break;

					case "has_more":
						break;

					case "exp":
						result.Expression = pair.Value;
						break;

					default:
						Console.WriteLine("Unimplemented variable object field.");
						break;
				}
			}

			result.Parent = parent;

			return result;
		}