{"action":"created","issue":{"url":"https://api.github.com/repos/marcusoftnet/SpecFlow.Assist.Dynamic/issues/5","repository_url":"https://api.github.com/repos/marcusoftnet/SpecFlow.Assist.Dynamic","labels_url":"https://api.github.com/repos/marcusoftnet/SpecFlow.Assist.Dynamic/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/marcusoftnet/SpecFlow.Assist.Dynamic/issues/5/comments","events_url":"https://api.github.com/repos/marcusoftnet/SpecFlow.Assist.Dynamic/issues/5/events","html_url":"https://github.com/marcusoftnet/SpecFlow.Assist.Dynamic/issues/5","id":12794341,"number":5,"title":"Add support for additional types, specified by user.","user":{"login":"Friischling","id":1010029,"avatar_url":"https://avatars.githubusercontent.com/u/1010029?v=3","gravatar_id":"","url":"https://api.github.com/users/Friischling","html_url":"https://github.com/Friischling","followers_url":"https://api.github.com/users/Friischling/followers","following_url":"https://api.github.com/users/Friischling/following{/other_user}","gists_url":"https://api.github.com/users/Friischling/gists{/gist_id}","starred_url":"https://api.github.com/users/Friischling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Friischling/subscriptions","organizations_url":"https://api.github.com/users/Friischling/orgs","repos_url":"https://api.github.com/users/Friischling/repos","events_url":"https://api.github.com/users/Friischling/events{/privacy}","received_events_url":"https://api.github.com/users/Friischling/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2013-04-04T10:36:09Z","updated_at":"2016-04-08T22:25:40Z","closed_at":null,"body":"A nice addition, would be to allow the user to add custom converters to the type-conversion. \r\nThis would give the flexibility of the Dynamic but with the freedom of creating custom types whenever this is needed. \r\nAt the moment, only the types specified below is supported.\r\n\r\nOne could utilize the IObjectContainer to register additional converters, and this could be queried in the process below.\r\n\r\n```\r\n private static object CreateTypedValue(string valueFromTable)\r\n        {\r\n            // TODO: More types here?\r\n            int i;\r\n            if (int.TryParse(valueFromTable, out i))\r\n                return i;\r\n\r\n            double d;\r\n            if (Double.TryParse(valueFromTable, out d))\r\n                return d;\r\n\r\n            bool b;\r\n            if (Boolean.TryParse(valueFromTable, out b))\r\n                return b;\r\n\r\n            DateTime dt;\r\n            if (DateTime.TryParse(valueFromTable, out dt))\r\n                return dt;\r\n\r\n            return valueFromTable;\r\n        }\r\n```"},"comment":{"url":"https://api.github.com/repos/marcusoftnet/SpecFlow.Assist.Dynamic/issues/comments/207631494","html_url":"https://github.com/marcusoftnet/SpecFlow.Assist.Dynamic/issues/5#issuecomment-207631494","issue_url":"https://api.github.com/repos/marcusoftnet/SpecFlow.Assist.Dynamic/issues/5","id":207631494,"user":{"login":"vzakanj","id":1140334,"avatar_url":"https://avatars.githubusercontent.com/u/1140334?v=3","gravatar_id":"","url":"https://api.github.com/users/vzakanj","html_url":"https://github.com/vzakanj","followers_url":"https://api.github.com/users/vzakanj/followers","following_url":"https://api.github.com/users/vzakanj/following{/other_user}","gists_url":"https://api.github.com/users/vzakanj/gists{/gist_id}","starred_url":"https://api.github.com/users/vzakanj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vzakanj/subscriptions","organizations_url":"https://api.github.com/users/vzakanj/orgs","repos_url":"https://api.github.com/users/vzakanj/repos","events_url":"https://api.github.com/users/vzakanj/events{/privacy}","received_events_url":"https://api.github.com/users/vzakanj/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T22:25:40Z","updated_at":"2016-04-08T22:25:40Z","body":"This would indeed be useful for situations where I don't want the conversion to occur (e.g. want to treat the values from the tables as strings).\r\nAnother useful addition would be to explicitly specify culture or format for the date parsing.\r\n\r\nI could chip in on this, just let me know if there are any special requirements for building the project."}}