Skip to content

Commit 2f37941

Browse files
SeeminglySciencedaviwil
authored andcommitted
Add EditorCommandAttribute class
This class will be used by Import-EditorCommand to target commands for registration as editor commands.
1 parent b413d73 commit 2f37941

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System;
2+
3+
namespace Microsoft.PowerShell.EditorServices.Extensions
4+
{
5+
/// <summary>
6+
/// Provides an attribute that can be used to target PowerShell
7+
/// commands for import as editor commands.
8+
/// </summary>
9+
[AttributeUsage(AttributeTargets.Class)]
10+
public class EditorCommandAttribute : Attribute
11+
{
12+
13+
#region Properties
14+
15+
/// <summary>
16+
/// Gets or sets the name which uniquely identifies the command.
17+
/// </summary>
18+
public string Name { get; set; }
19+
20+
/// <summary>
21+
/// Gets or sets the display name for the command.
22+
/// </summary>
23+
public string DisplayName { get; set; }
24+
25+
/// <summary>
26+
/// Gets or sets a value indicating whether this command's output
27+
/// should be suppressed.
28+
/// </summary>
29+
public bool SuppressOutput { get; set; }
30+
31+
#endregion
32+
}
33+
}

0 commit comments

Comments
 (0)