Exemplo n.º 1
0
        public HelpCommand(ICollection <Command> col)
        {
            this._cmds = col as ConsoleCommander.Structures.LinkedList <Command>;
            _names     = new String[col.Count];
            Int32 i = 0;

            if (_cmds == null)
            {
                _cmds = new ConsoleCommander.Structures.LinkedList <Command>();
                foreach (Command c in col)
                {
                    _cmds.Add(c);
                    _names[i] = c.GetName();
                    i++;
                }
            }
            else
            {
                foreach (Command c in col)
                {
                    _names[i] = c.GetName();
                    i++;
                }
            }
        }