Title: No way of Invoking a generic method with multiple overload and out/byref parameters · Issue #641 · pythonnet/pythonnet · GitHub
Open Graph Title: No way of Invoking a generic method with multiple overload and out/byref parameters · Issue #641 · pythonnet/pythonnet
X Title: No way of Invoking a generic method with multiple overload and out/byref parameters · Issue #641 · pythonnet/pythonnet
Description: Environment Pythonnet version: 2.4.0.dev0 Python version: 3.6.4 Operating System: Windows 7 64 Details Describe what you were trying to get done. Invoke a generic method with multiple overload and out parameters What commands did you run...
Open Graph Description: Environment Pythonnet version: 2.4.0.dev0 Python version: 3.6.4 Operating System: Windows 7 64 Details Describe what you were trying to get done. Invoke a generic method with multiple overload and ...
X Description: Environment Pythonnet version: 2.4.0.dev0 Python version: 3.6.4 Operating System: Windows 7 64 Details Describe what you were trying to get done. Invoke a generic method with multiple overload and ...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/641
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"No way of Invoking a generic method with multiple overload and out/byref parameters","articleBody":"### Environment\r\n\r\n- Pythonnet version: 2.4.0.dev0\r\n- Python version: 3.6.4\r\n- Operating System: Windows 7 64\r\n\r\n### Details\r\n\r\n- Describe what you were trying to get done.\r\n\r\n Invoke a generic method with multiple overload and out parameters\r\n\r\n- What commands did you run to trigger this issue? \r\n\r\n```C#\r\n//C# SIDE\r\n//...\r\n public void GetProperty\u003cT\u003e(string propertyName, out T value){...} //\u003c= The one i'm trying to get\r\n public void GetProperty\u003cT\u003e(string propertyName, out T value, bool asRef){...}\r\n public void GetProperty\u003cT\u003e(string propertyName, out T value, int index){...}\r\n public void GetProperty\u003cT\u003e(string propertyName, out T value, int index, bool asRef){...}\r\n public void GetProperty\u003cT\u003e(PropertyID propertyID, out T value, int index){...}\r\n public void GetProperty\u003cT\u003e(PropertyID propertyID, out T value, bool asRef){...}\r\n//...\r\n```\r\n\r\n```python\r\n#PYTHON SIDE, What i've tested so far\r\nobject.GetProperty[System.Single]('PropertyName', None) #FAIL\r\nobject.GetProperty[System.Single]('PropertyName', System.Single(0).GetType()) #FAIL\r\nobject.GetProperty[System.Single]('PropertyName', System.Single(0).GetType().MakeByRefType()) #FAIL\r\n\r\nobject.GetProperty('PropertyName', None) #FAIL\r\nobject.GetProperty('PropertyName', System.Single(0).GetType()) #FAIL\r\nobject.GetProperty('PropertyName', System.Single(0).GetType().MakeByRefType()) #FAIL\r\n\r\nobject.GetProperty.Overloads[System.String, System.Single(0).GetType().MakeByRefType()]('PropertyName', None) #FAIL\r\n```\r\n\r\n- Traceback:\r\n\r\n```python\r\n Traceback (most recent call last):\r\n File \"C:\\Users\\{USER}\\AppData\\Local\\Programs\\Python\\Python36\\lib\\runpy.py\", line 193, in _run_module_as_main\r\n \"__main__\", mod_spec)\r\n File \"C:\\Users\\{USER}\\AppData\\Local\\Programs\\Python\\Python36\\lib\\runpy.py\", line 85, in _run_code\r\n exec(code, run_globals)\r\n File \"D:/PythonWorkspace/{MODULE}\\__main__.py\", line 5, in \u003cmodule\u003e\r\n test_pythonnet.launchTest()\r\n File \"D:/PythonWorkspace/{MODULE}\\test_pythonnet.py\", line 45, in launchTest\r\n test = object.GetProperty[System.Single]('PropertyName', byref)\r\nTypeError: No method matches given arguments\r\n```\r\n\r\nSo, i'm at a loss here, do i need to do all the reflection stuff by hand ?","author":{"url":"https://github.com/RockHornetz","@type":"Person","name":"RockHornetz"},"datePublished":"2018-03-04T17:47:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/641/pythonnet/issues/641"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:378d5fca-8262-6b03-7333-23ef01d43dc3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8510:16019F:EDC2A1:14F3159:6970B664 |
| html-safe-nonce | 6076bbe90c22149d7f5b3e66af99b5cfb3c9134d7f440e2fbfcdf27fcdb16421 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTEwOjE2MDE5RjpFREMyQTE6MTRGMzE1OTo2OTcwQjY2NCIsInZpc2l0b3JfaWQiOiI4ODYyNDc3NDM4NjYzMzA4OTAwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 52d6c0abdafd57488e9a5dcecbc02e37c8fa2b75505edbbcbdb9427914b93a17 |
| hovercard-subject-tag | issue:302105502 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pythonnet/pythonnet/641/issue_layout |
| twitter:image | https://opengraph.githubassets.com/624acd3cdf1aa34804c392c5955328d49a152119d8aa373fdf3823e45ce211fd/pythonnet/pythonnet/issues/641 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/624acd3cdf1aa34804c392c5955328d49a152119d8aa373fdf3823e45ce211fd/pythonnet/pythonnet/issues/641 |
| og:image:alt | Environment Pythonnet version: 2.4.0.dev0 Python version: 3.6.4 Operating System: Windows 7 64 Details Describe what you were trying to get done. Invoke a generic method with multiple overload and ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | RockHornetz |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8e0be80373b724b033cdf8a7b1f78bf5fb6a5d7a2182a9a403aa30894606e390 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 84d9d5bf3b01412ea10f7c2429cbfc735ccce9ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width