File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
src/PowerShellEditorServices/Extensions Expand file tree Collapse file tree 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)
9090 this . extensionService . UnregisterCommand ( commandName ) ;
9191 }
9292
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+ }
93101 /// <summary>
94102 /// Gets the EditorContext which contains the state of the editor
95103 /// 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)
170170 }
171171 }
172172
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+ }
173183 #endregion
174184
175185 #region Events
You can’t perform that action at this time.
0 commit comments