Exemple #1
0
        /// <summary>
        /// Parse the command arguments for the read-feed command.
        /// </summary>
        /// <param name="args"></param>
        /// <param name="idx"></param>
        /// <param name="switchOut"></param>
        /// <returns></returns>
        public override int Parse(string[] args, int idx, out Switch switchOut)
        {
            // check next argument.
            if (args.Length < idx)
            {
                throw new SwitchParserException("None", "Invalid path for read-feed command!");
            }

            // everything ok, take the next argument as the path.
            switchOut = new SwitchReadFeed()
            {
                Path = args[idx]
            };
            return 1;
        }
Exemple #2
0
        /// <summary>
        /// Parse the command arguments for the read-feed command.
        /// </summary>
        /// <param name="args"></param>
        /// <param name="idx"></param>
        /// <param name="switchOut"></param>
        /// <returns></returns>
        public override int Parse(string[] args, int idx, out Switch switchOut)
        {
            // check next argument.
            if (args.Length < idx)
            {
                throw new SwitchParserException("None", "Invalid path for read-feed command!");
            }

            // everything ok, take the next argument as the path.
            switchOut = new SwitchReadFeed()
            {
                Path = args[idx]
            };
            return(1);
        }