public bool TryRemove(string name, out IHotKeyCommand command)
        {
            if (this.TryGetCommand(name, out command))
            {
                this.registryByName.Remove(name);
                this.indexByHashCode.Remove(command.GetHashCode());

                return(true);
            }

            return(false);
        }
        public bool TryGetCommand(int hashCode, out IHotKeyCommand command)
        {
            string name;

            if (this.TryGetName(hashCode, out name))
            {
                return(this.registryByName.TryGetValue(name, out command));
            }

            command = null;
            return(false);
        }
 public bool TryGetCommand(string name, out IHotKeyCommand command)
 {
     return(this.registryByName.TryGetValue(name, out command));
 }
 public void Register(string name, IHotKeyCommand command)
 {
     this.registryByName.Add(name, command);
     this.indexByHashCode.Add(command.GetHashCode(), name);
 }