public void AddLiteral(string name, string expression)
        {
            DebuggerScriptResult result = new DebuggerScriptResult(name, expression, 0);

            result.IsLiteral = true;
            Results.Add(result);
        }
Пример #2
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            dataGrid.Items.Clear();

            DebuggerScriptRunner command = new DebuggerScriptRunner();

            try
            {
                ThreadHelper.ThrowIfNotOnUIThread();
                DTE dte = (DTE)Package.GetGlobalService(typeof(DTE));

                var results = command.Execute(scriptBox.Text, dte.Debugger);

                foreach (var result in results.GetResults())
                {
                    result.Evaluate(dte.Debugger);
                    dataGrid.Items.Add(result);
                }
            }
            catch (System.Exception ex)
            {
                DebuggerScriptResult result = new DebuggerScriptResult(ex.Message);
                dataGrid.Items.Add(result);
            }
        }
        public void Add(string name, string expression, int index)
        {
            DebuggerScriptResult result = new DebuggerScriptResult(name, expression, index);

            Results.Add(result);
        }