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>
 /// Parses string arguments into an actual command object.
 /// </summary>
 /// <param name="args"></param>
 /// <param name="idx"></param>
 /// <param name="switchOut"></param>
 /// <returns></returns>
 public abstract int Parse(string[] args, int idx, out Switch switchOut);
Exemple #3
0
 /// <summary>
 /// Parse the command arguments for the write-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)
 {
     switchOut = new SwitchValidateFeed();
     return 0;
 }
Exemple #4
0
 /// <summary>
 /// Parses string arguments into an actual command object.
 /// </summary>
 /// <param name="args"></param>
 /// <param name="idx"></param>
 /// <param name="switchOut"></param>
 /// <returns></returns>
 public abstract int Parse(string[] args, int idx, out Switch switchOut);