Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Application Server

Invoke/update other commands

  • Last UpdatedJul 23, 2024
  • 1 minute read

The IDE provides “IaaCommands” and “IaaCommand” interfaces to facilitate extensions get access to any command available in its command set. Extension can query service pool to get “IaaCommands” and call its indexer to get actual command. This way extension can update/invoke any command by calling “Invoke” and “Update” helper methods respectively.

The following is an example of how to invoke another command. This is a simple command invocation and it does not pass any context. For mode detailed sample example extension provided. Updating another command works the same way.

private void InvokeAnotherCommand()

{

IaaCommands cmds = m_site.Services[typeof(IaaCommands)] as

IaaCommands;

IaaCommand cmdNew = cmds["cmdNew"];

if(cmdNew != null)

{

// IaaCommandContext concept is explained in the next section.

IaaCommandContext context = null;

cmdNew.Invoke(context, null); // Invoke cmdNew command.

}

}

TitleResults for “How to create a CRG?”Also Available in