File tree 2 files changed +18
-0
lines changed
src/PowerShellEditorServices/Extensions
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,14 @@ public void UnregisterCommand(string commandName)
90
90
this . extensionService . UnregisterCommand ( commandName ) ;
91
91
}
92
92
93
+ /// <summary>
94
+ /// Returns all registered EditorCommands.
95
+ /// </summary>
96
+ /// <returns>An Array of all registered EditorCommands.</return>
97
+ public EditorCommand [ ] GetCommands ( )
98
+ {
99
+ return this . extensionService . GetCommands ( ) ;
100
+ }
93
101
/// <summary>
94
102
/// Gets the EditorContext which contains the state of the editor
95
103
/// at the time this method is invoked.
Original file line number Diff line number Diff line change @@ -170,6 +170,16 @@ public void UnregisterCommand(string commandName)
170
170
}
171
171
}
172
172
173
+ /// <summary>
174
+ /// Returns all registered EditorCommands.
175
+ /// </summary>
176
+ /// <returns>An Array of all registered EditorCommands.</return>
177
+ public EditorCommand [ ] GetCommands ( )
178
+ {
179
+ EditorCommand [ ] commands = new EditorCommand [ this . editorCommands . Count ] ;
180
+ this . editorCommands . Values . CopyTo ( commands , 0 ) ;
181
+ return commands ;
182
+ }
173
183
#endregion
174
184
175
185
#region Events
You can’t perform that action at this time.
0 commit comments