{"action":"closed","issue":{"url":"https://api.github.com/repos/adamabdelhamed/PowerArgs/issues/60","labels_url":"https://api.github.com/repos/adamabdelhamed/PowerArgs/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/adamabdelhamed/PowerArgs/issues/60/comments","events_url":"https://api.github.com/repos/adamabdelhamed/PowerArgs/issues/60/events","html_url":"https://github.com/adamabdelhamed/PowerArgs/issues/60","id":54929184,"number":60,"title":"PowerArgs, help implementing a \"Help\" option...","user":{"login":"StanleyGoldman","id":417571,"avatar_url":"https://avatars.githubusercontent.com/u/417571?v=3","gravatar_id":"","url":"https://api.github.com/users/StanleyGoldman","html_url":"https://github.com/StanleyGoldman","followers_url":"https://api.github.com/users/StanleyGoldman/followers","following_url":"https://api.github.com/users/StanleyGoldman/following{/other_user}","gists_url":"https://api.github.com/users/StanleyGoldman/gists{/gist_id}","starred_url":"https://api.github.com/users/StanleyGoldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StanleyGoldman/subscriptions","organizations_url":"https://api.github.com/users/StanleyGoldman/orgs","repos_url":"https://api.github.com/users/StanleyGoldman/repos","events_url":"https://api.github.com/users/StanleyGoldman/events{/privacy}","received_events_url":"https://api.github.com/users/StanleyGoldman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/adamabdelhamed/PowerArgs/labels/ANSWERED%21","name":"ANSWERED!","color":"009800"},{"url":"https://api.github.com/repos/adamabdelhamed/PowerArgs/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-20T19:42:06Z","updated_at":"2015-01-21T18:19:01Z","closed_at":"2015-01-21T18:19:01Z","body":"I'm trying to create an option that would output the usage template and exit the program.\r\nI would like additional arguments to prompt if missing, if Help was not flagged.\r\nIf the user does not specify the Help flag, it should then prompt the user for the other arguments.\r\nIn my case below, OtherArg prompts as expected, but the resulting value is always null.\r\n\r\n    public class TestArgs\r\n    {\r\n        [ArgShortcut(\"?\")]\r\n        public bool Help { get; set; }\r\n\r\n        [ArgRequired(PromptIfMissing = true, IfNot = \"Help\")]\r\n        public string OtherArg { get; set; }\r\n    }\r\n\r\n    class Program\r\n    {\r\n        private static void Main(string[] args)\r\n        {\r\n            var testArgs = Args.Parse<TestArgs>(args);\r\n            if (testArgs .Help)\r\n            {\r\n                Console.WriteLine(ArgUsage.GenerateUsageFromTemplate<TestArgs>());\r\n                return;\r\n            }\r\n        }\r\n    }"}}