コード例 #1
0
 public CommandlineParser(string commandLine)
 {
     _Params = new CommandLineParameterWithValueCollection();
     CreateKeys(GetAppArgsFromCommandLine(commandLine));
 }
コード例 #2
0
 public ApplicationParameters(CommandLineParameterWithValueCollection parameters)
 {
     this._Parameters = parameters;
 }
コード例 #3
0
        public static CommandLineParameterCollection GetMissingMandatoryParams(CommandLineParameterCollection mandatoryParams, CommandLineParameterWithValueCollection currentAppParams)
        {
            CommandLineParameterCollection missingRequiredParams = new CommandLineParameterCollection();

            foreach (CommandLineParameter param in mandatoryParams)
            {
                if (param.IsMandatory && currentAppParams.Find(p => String.Compare(p.GetName(), param.GetName(), true) == 0) == null)
                {
                    missingRequiredParams.Add(param);
                }
            }

            return(missingRequiredParams);
        }