{"action":"created","issue":{"url":"https://api.github.com/repos/fclp/fluent-command-line-parser/issues/35","labels_url":"https://api.github.com/repos/fclp/fluent-command-line-parser/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/fclp/fluent-command-line-parser/issues/35/comments","events_url":"https://api.github.com/repos/fclp/fluent-command-line-parser/issues/35/events","html_url":"https://github.com/fclp/fluent-command-line-parser/issues/35","id":78997799,"number":35,"title":"Another validation question","user":{"login":"leej0nes","id":165180,"avatar_url":"https://avatars.githubusercontent.com/u/165180?v=3","gravatar_id":"","url":"https://api.github.com/users/leej0nes","html_url":"https://github.com/leej0nes","followers_url":"https://api.github.com/users/leej0nes/followers","following_url":"https://api.github.com/users/leej0nes/following{/other_user}","gists_url":"https://api.github.com/users/leej0nes/gists{/gist_id}","starred_url":"https://api.github.com/users/leej0nes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leej0nes/subscriptions","organizations_url":"https://api.github.com/users/leej0nes/orgs","repos_url":"https://api.github.com/users/leej0nes/repos","events_url":"https://api.github.com/users/leej0nes/events{/privacy}","received_events_url":"https://api.github.com/users/leej0nes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-21T13:34:42Z","updated_at":"2015-05-22T11:56:10Z","closed_at":null,"body":"I've written a validation extension method using ICommandLineOptionFluent<T> as the extensions key parameter, the method signature is as follows:\r\n\r\n        public static void Validate<T>(this ICommandLineOptionFluent<T> value, Predicate<T> validate)\r\n        {\r\n            ...\r\n            ...\r\n            ...\r\n        }\r\n\t\t\r\nMy question is how can I get the value to pass to the predicate, currently I see no way of doing this rendering the extension pointless.  I was hoping to write something which I could contribute back.  \r\n\r\nAs as an example of how I pictured this working:\r\n\r\n            fluentCommandLineParser\r\n                .Setup(arg => arg.Endpoints)\r\n                .As('e', \"endpoint\")\r\n                .Required()\r\n                .Validate(addresses => addresses.All(address => address.IsAddress()));\r\n\r\nAny advice?\r\n\r\nThanks,\r\nLee."},"comment":{"url":"https://api.github.com/repos/fclp/fluent-command-line-parser/issues/comments/104642864","html_url":"https://github.com/fclp/fluent-command-line-parser/issues/35#issuecomment-104642864","issue_url":"https://api.github.com/repos/fclp/fluent-command-line-parser/issues/35","id":104642864,"user":{"login":"siywilliams","id":3663513,"avatar_url":"https://avatars.githubusercontent.com/u/3663513?v=3","gravatar_id":"","url":"https://api.github.com/users/siywilliams","html_url":"https://github.com/siywilliams","followers_url":"https://api.github.com/users/siywilliams/followers","following_url":"https://api.github.com/users/siywilliams/following{/other_user}","gists_url":"https://api.github.com/users/siywilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/siywilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siywilliams/subscriptions","organizations_url":"https://api.github.com/users/siywilliams/orgs","repos_url":"https://api.github.com/users/siywilliams/repos","events_url":"https://api.github.com/users/siywilliams/events{/privacy}","received_events_url":"https://api.github.com/users/siywilliams/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T11:56:10Z","updated_at":"2015-05-22T11:56:10Z","body":"Hi Lee,\r\n\r\nYou're unfortunately not going to get access to the guts that you want through the use of extensions methods, you'll have to mod the library itself.\r\n\r\nI've just whipped up a rough commit with the bits that I think you would need. See the [commit](https://github.com/fclp/fluent-command-line-parser/commit/385b9918113bbdbb26411da75639789047f50390) I've made in the new [Issue-35 branch](https://github.com/fclp/fluent-command-line-parser/tree/issue-35)"}}