{"action":"opened","issue":{"url":"https://api.github.com/repos/ekonbenefits/dynamitey/issues/15","repository_url":"https://api.github.com/repos/ekonbenefits/dynamitey","labels_url":"https://api.github.com/repos/ekonbenefits/dynamitey/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/ekonbenefits/dynamitey/issues/15/comments","events_url":"https://api.github.com/repos/ekonbenefits/dynamitey/issues/15/events","html_url":"https://github.com/ekonbenefits/dynamitey/issues/15","id":177498140,"number":15,"title":"Add support for creating dynamic static objects","user":{"login":"jcansdale","id":11719160,"avatar_url":"https://avatars.githubusercontent.com/u/11719160?v=3","gravatar_id":"","url":"https://api.github.com/users/jcansdale","html_url":"https://github.com/jcansdale","followers_url":"https://api.github.com/users/jcansdale/followers","following_url":"https://api.github.com/users/jcansdale/following{/other_user}","gists_url":"https://api.github.com/users/jcansdale/gists{/gist_id}","starred_url":"https://api.github.com/users/jcansdale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcansdale/subscriptions","organizations_url":"https://api.github.com/users/jcansdale/orgs","repos_url":"https://api.github.com/users/jcansdale/repos","events_url":"https://api.github.com/users/jcansdale/events{/privacy}","received_events_url":"https://api.github.com/users/jcansdale/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-16T19:07:50Z","updated_at":"2016-09-16T19:07:50Z","closed_at":null,"body":"After looking at the following unit test:\r\n\r\n```\r\n        [Test]\r\n        public void TestStaticDateTimeMethod()\r\n        {\r\n            var @static = InvokeContext.CreateStatic;\r\n            object tDateDyn = \"01/20/2009\";\r\n            var tDate = Dynamic.InvokeMember(@static(typeof(DateTime)), \"Parse\", tDateDyn);\r\n            Assert.AreEqual(new DateTime(2009, 1, 20), tDate);\r\n        }\r\n```\r\n\r\nI was hoping something like this might be possible:\r\n\r\n```\r\n            var @static = InvokeContext.CreateStatic;\r\n            object tDateDyn = \"01/20/2009\";\r\n\r\n            dynamic staticObject = @static(typeof(DateTime));\r\n            var tDate = staticObject.Parse(\"Parse\", tDateDyn);\r\n\r\n            Assert.AreEqual(new DateTime(2009, 1, 20), tDate);\r\n```\r\n\r\nIs there some technical reason why this would be impossible?\r\n\r\nThanks!"}}
{"actor":{"display_login":"jcansdale"}}