You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.2 KiB
47 lines
1.2 KiB
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) |
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) |
|
|
|
using System; |
|
using System.Collections.Generic; |
|
using System.Linq; |
|
using System.Text; |
|
using System.Windows; |
|
|
|
using ICSharpCode.Profiler.Controls; |
|
|
|
namespace ICSharpCode.Profiler.AddIn.Commands |
|
{ |
|
/// <summary> |
|
/// Description of CopySelectedData |
|
/// </summary> |
|
public class CopySelectedData : ProfilerMenuCommand |
|
{ |
|
/// <summary> |
|
/// Starts the command |
|
/// </summary> |
|
public override void Run() |
|
{ |
|
var list = GetSelectedItems(); |
|
|
|
if (list.FirstOrDefault() != null) { |
|
StringBuilder builder = new StringBuilder(); |
|
|
|
foreach (CallTreeNodeViewModel node in list) { |
|
if (node != null) |
|
builder.AppendLine( |
|
new string('\t', node.Level) + |
|
node.Name + "\t" + |
|
node.CallCount + "\t" + |
|
node.TimeSpent + "\t" + |
|
node.TimeSpentSelf + "\t" + |
|
node.TimeSpentPerCall + "\t" + |
|
node.TimeSpentSelfPerCall + "\t" + |
|
node.TimePercentageOfParentAsText |
|
); |
|
} |
|
|
|
Clipboard.SetText(builder.ToString()); |
|
} |
|
} |
|
} |
|
}
|
|
|