{"action":"opened","issue":{"url":"https://api.github.com/repos/gsscoder/commandline/issues/181","labels_url":"https://api.github.com/repos/gsscoder/commandline/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/gsscoder/commandline/issues/181/comments","events_url":"https://api.github.com/repos/gsscoder/commandline/issues/181/events","html_url":"https://github.com/gsscoder/commandline/issues/181","id":93037355,"number":181,"title":"Helper methods for Parsed/NotParsed types","user":{"login":"gsscoder","id":1194228,"avatar_url":"https://avatars.githubusercontent.com/u/1194228?v=3","gravatar_id":"","url":"https://api.github.com/users/gsscoder","html_url":"https://github.com/gsscoder","followers_url":"https://api.github.com/users/gsscoder/followers","following_url":"https://api.github.com/users/gsscoder/following{/other_user}","gists_url":"https://api.github.com/users/gsscoder/gists{/gist_id}","starred_url":"https://api.github.com/users/gsscoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsscoder/subscriptions","organizations_url":"https://api.github.com/users/gsscoder/orgs","repos_url":"https://api.github.com/users/gsscoder/repos","events_url":"https://api.github.com/users/gsscoder/events{/privacy}","received_events_url":"https://api.github.com/users/gsscoder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-04T18:45:47Z","updated_at":"2015-07-04T18:45:47Z","closed_at":null,"body":"After this recent fix: https://github.com/gsscoder/commandline/issues/180, I guess with need helper methods for two states of `ParserResult<T>`.\r\n```csharp\r\nvar result = CommandLine.Parser.Default.ParseArguments<Options>(args);\r\nresult.Parsed( opts => ...);\r\nresult.NotParsed( errs => ...);\r\n```\r\nIn this case the signature will be:\r\n```csharp\r\nvoid Parsed(Action<T> action);\r\nvoid NotParsed(Action<IEnumerable<Error>> action);\r\n```\r\nBut we can also provide alternatives (or only these) to chain calls:\r\n```csharp\r\nParserResult<T> Parsed(Action<T> action);\r\nParserResult<T> NotParsed(Action<IEnumerable<Error>> action);\r\n```\r\nOther idea: _Or an integer to use with `Environment.Exit`? _\r\n\r\ncc/ @nemec @mizipzor @gimmemoore "}}