Example #1
0
        public static string GetUsage(string hostExecutableName)
        {
            string usage = String.Format("{0} {1}", hostExecutableName, CommandLineParameterCollection.GetUsage()) + Environment.NewLine;

            usage += CommandLineParameterCollection.GetHelpText();
            return(usage);
        }
        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);
        }