public GetCommand ( object cmdId ) : MonoDevelop.Components.Commands.Command | ||
cmdId | object | /// The identifier of the command /// |
return | MonoDevelop.Components.Commands.Command |
public Command GetCommand (object cmdId)
{
// Include the type name when converting enum members to ids.
cmdId = ToCommandId (cmdId);
Command cmd;
if (cmds.TryGetValue (cmdId, out cmd))
return cmd;
else
return null;
}
public virtual Command GetCommand (CommandManager manager) { if (localCmd != null) { if (manager.GetCommand (localCmd.Id) == null) manager.RegisterCommand (localCmd); localCmd = null; } return manager.GetCommand (cmdId); }