private void RegisterAttributeCommand(MethodInfo info, ConsoleCommandAttribute attr) { Command comm = null; m_masterDictionary.TryGetValue(attr.name, out comm); if (comm != null) { Debug.LogError("Multiple Attribute ConsoleCommands with the same name: " + attr.name + " , this is not allowed."); return; } else { AttributeCommand cmd = new AttributeCommand(attr.name, attr.description, this); cmd.Initialize(info); m_attributeCommandsDictionary.Add(attr.name, cmd); m_masterDictionary.Add(attr.name, cmd); m_commandsTrie.Add(new TrieEntry <string>(attr.name, attr.name)); } }
private void initializeCommands() { CopyGuidCommand = new BaseDataCommand(CopyGuidExec, HasGuid); FindRef = new AttributeCommand(FindRefExec, IsAttributeRef); XmlCommand = new BaseDataCommand(XmlExec, IsTrue); GetCaptionCommand = new BaseDataCommand(GetCaptionTextExec, HasGuid); ShowCommandBarCommand = new BaseDataCommand(ShowCommandBarExec, IsCommandBarData); HideCommandBarCommand = new BaseDataCommand(HideCommandBarExec, IsCommandBarData); CommandBarModeCommand = new BaseDataCommand(CommandBarModeExec, IsCommandBarData); ShowThisCommand = new BaseDataCommand(ShowItemExec, IsItemData); HideThisCommand = new BaseDataCommand(CopyGuidExec, IsItemData); ShowDialogCommand = new BaseDataCommand(ShowDialogExec, IsDialogData); HideDialogCommand = new BaseDataCommand(HideDialogExec, IsDialogData); ShowDockerCommand = new BaseDataCommand(ShowDockerExec, IsDockerData); HideDockerCommand = new BaseDataCommand(HideDockerExec, IsDockerData); InvokeItemCommand = new BaseDataCommand(ItemInvokeExec, IsItemData); GetDockersCaptionCommand = new BaseDataCommand(GetDockersCaptionExec, IsDockers); GetDockersGuidCommand = new BaseDataCommand(GetDockersGuidExec, IsDockers); RemoveMeCommand = new BaseDataCommand(RemoveMeExec, IsSearchData); HighLightCommand = new SimpleCommand(showHighLightItem); }
public static void AddCommand(AttributeCommand command) { attributeCommands.Add(command); }