Exemple #1
0
        public override void Execute(ThreadsCtxMenuContext context)
        {
            var output = new StringBuilderTextColorOutput();

            foreach (var vm in context.SelectedItems)
            {
                var printer = new ThreadPrinter(output, debuggerSettings.UseHexadecimal, theDebugger.Value.Debugger);
                printer.WriteCurrent(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteId(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteManagedId(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteCategory(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteName(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteLocation(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WritePriority(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteAffinityMask(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteSuspended(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteProcess(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteAppDomain(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteUserState(vm);
                output.WriteLine();
            }
            var s = output.ToString();

            if (s.Length > 0)
            {
                try {
                    Clipboard.SetText(s);
                }
                catch (ExternalException) { }
            }
        }
Exemple #2
0
        public override void Execute(ThreadsCtxMenuContext context)
        {
            var output = new NoSyntaxHighlightOutput();

            foreach (var vm in context.SelectedItems)
            {
                var printer = new ThreadPrinter(output, debuggerSettings.UseHexadecimal, theDebugger.Value.Debugger);
                printer.WriteCurrent(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteId(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteManagedId(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteCategory(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteName(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteLocation(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WritePriority(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteAffinityMask(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteSuspended(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteProcess(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteAppDomain(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteUserState(vm);
                output.WriteLine();
            }
            var s = output.ToString();

            if (s.Length > 0)
            {
                Clipboard.SetText(s);
            }
        }
Exemple #3
0
        protected override void Execute(ThreadsCtxMenuContext context)
        {
            var output = new PlainTextOutput();

            foreach (var vm in context.SelectedItems)
            {
                var printer = new ThreadPrinter(output, DebuggerSettings.Instance.UseHexadecimal);
                printer.WriteCurrent(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteId(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteManagedId(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteCategory(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteName(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteLocation(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WritePriority(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteAffinityMask(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteSuspended(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteProcess(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteAppDomain(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteUserState(vm);
                output.WriteLine();
            }
            var s = output.ToString();

            if (s.Length > 0)
            {
                Clipboard.SetText(s);
            }
        }