-
Notifications
You must be signed in to change notification settings - Fork 295
/
ToDoItemFormatter.cs
33 lines (29 loc) · 1.03 KB
/
ToDoItemFormatter.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using Rubberduck.ToDoItems;
using Rubberduck.Common;
using Rubberduck.Resources;
namespace Rubberduck.Formatters
{
public class ToDoItemFormatter : IExportable
{
private readonly ToDoItem _toDoItem;
public ToDoItemFormatter(ToDoItem toDoItem)
{
_toDoItem = toDoItem;
}
public object[] ToArray()
{
var module = _toDoItem.Selection.QualifiedName;
return new object[] { _toDoItem.Type, _toDoItem.Description, module.ProjectName, module.ComponentName, _toDoItem.Selection.Selection.StartLine, _toDoItem.Selection.Selection.StartColumn };
}
public string ToClipboardString()
{
var module = _toDoItem.Selection.QualifiedName;
return string.Format(RubberduckUI.ToDoExplorerToDoItemFormat,
_toDoItem.Type,
_toDoItem.Description,
module.ProjectName,
module.ComponentName,
_toDoItem.Selection.Selection.StartLine);
}
}
}